[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] TestCase20
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] TestCase20 |
Date: |
Tue, 11 Jan 2011 09:58:08 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
<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