gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] Bug report.... offending code works outside of procedure, but


From: Dragiša Durić
Subject: Re: [Gm2] Bug report.... offending code works outside of procedure, but inside - not.
Date: Sun, 25 Jul 2010 13:15:24 +0200

This one does not happen if "where" declaration is in outer (global)
scope.

On Sun, 2010-07-25 at 07:36 +0200, Dragiša Durić wrote:
> gm2 -fiso -c TestCase.mod
> TestCase.mod:15:5: error: assignment designator 'where' of type 'Where'
> is a variable and expression 'AlwaysTrue' of type 'BOOLEAN' are
> incompatible
> 
> ==================
> MODULE TestCase;
> 
> PROCEDURE AlwaysTrue(): BOOLEAN;
>   BEGIN
>     RETURN TRUE;
>   END AlwaysTrue;
> 
> TYPE
>   Where = PROCEDURE (): BOOLEAN;
> 
> PROCEDURE DoIt();
>   VAR
>     where: Where;
>   BEGIN
>     where := AlwaysTrue;
>   END DoIt;
> 
> END TestCase.
> 

-- 
Dragiša Durić <address@hidden>




reply via email to

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