gm2
[Top][All Lists]
Advanced

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

[Gm2] ISO strangeness


From: Gaius Mulley
Subject: [Gm2] ISO strangeness
Date: Mon, 03 Nov 2003 21:37:50 +0000

Hi,

I've been examining some ISO code and it appears that (from the code)
the following is legal:

DEFINITION MODULE a;
IMPORT b;
TYPE
   i = b.i ;
END a.

IMPLEMENTATION MODULE a;
FROM b IMPORT i;
END a.

DEFINITION MODULE b;
TYPE
   i;
END b.

IMPLEMENTATION MODULE b;
IMPORT SYSTEM;
TYPE
   i = SYSTEM.ADDRESS;
END b.

I'd have thought that when compiling module, a, an error should be
generated as the object, i, is being redeclared in the IMPLEMENTATION
MODULE. Can anyone verify:

 +  that this is legal in ISO M2
 +  and out of interest which compilers allow this

Thanks Gaius



reply via email to

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