gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] TestCase20


From: Dragiša Durić
Subject: Re: [Gm2] TestCase20
Date: Wed, 12 Jan 2011 13:35:07 +0100

I think I just made that example up, from bigger module I was pruning down to 
TestCase... I will try current version on my code and see if that error was 
just made up by my example.

In any case, thank you for great work and fixes. How does OSX branch fare? :)

On Jan 11, 2011, at 10:58 AM, Gaius Mulley wrote:

> <address@hidden> writes:
> 
>> % gm2 -I../../gm2.lib0 -c -fiso TestCase20a.mod
>> TestCase20b.def:10:11: error: error found while compiling the program
>> module
>> TestCase20b.def:10:11:problem in parameter 1, PROCEDURE DoSeq (uslov:
>> Uslov) ;
>> TestCase20b.def:10:11:item being passed is 'TrueBolan': BOOLEAN
>> TestCase20b.def:10:11:parameter mismatch: identifier with an
>> incompatible type is being passed to this procedure
>> TestCase20a.mod:12:3: error: error found while compiling the program
>> module
>> TestCase20a.mod:12:3:problem in parameter 1, PROCEDURE DoSeq (uslov:
>> Uslov) ;
>> TestCase20a.mod:12:3:item being passed is 'TrueBolan': BOOLEAN
>> TestCase20a.mod:12:3:parameter mismatch: identifier with an
>> incompatible type is being passed to this procedure
>> 
>> % cat TestCase20*(mod|def)
>> MODULE TestCase20a;
>> 
>> IMPORT
>> TestCase20b;
>> 
>> PROCEDURE TrueBolan (): BOOLEAN;
>> BEGIN
>>   RETURN TRUE;
>> END TrueBolan;
>> 
>> BEGIN
>> TestCase20b.DoSeq(TrueBolan);
>> END TestCase20a.
>> DEFINITION MODULE TestCase20b;
>> 
>> IMPORT
>> TestCase20;
>> 
>> CONST
>> Uslov = TestCase20.Uslov;
>> True = TestCase20.Uslov;
>> 
>> PROCEDURE DoSeq(uslov: Uslov);
>> 
>> END TestCase20b.
>> 
>> DEFINITION MODULE TestCase20;
>> 
>> TYPE
>> Uslov = PROCEDURE(): BOOLEAN;
>> 
>> PROCEDURE True(): BOOLEAN;
>> 
>> END TestCase20.
> 
> Hi,
> 
> now fixed in the cvs.  gm2 now detects this error correctly.  It
> compiles cleanly if the following change is made:
> 
>> CONST
>> Uslov = TestCase20.Uslov;
> 
> to
> 
> TYPE
>  Uslov = TestCase20.Uslov;
> 
> regards,
> Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]