www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - with alias - assert at line 2616 in 'mtype.c'

reply "Ilya Zaitseff" <sark7 mail333.com> writes:
class A
{
   int foo;
}

class B
{
   A a;
}

void main()
{
   B b;
   with (b)
   {
     alias a.foo bar;
   }
}

DMD 0.113 outputs:

Assertion failure: '!scopesym || !scopesym->isWithScopeSymbol()' on line  
2616 in file 'mtype.c'

abnormal program termination
Feb 14 2005
parent =?UTF-8?B?VGhvbWFzIEvDvGhuZQ==?= writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ilya Zaitseff wrote:

| class A
| {
|   int foo;
| }
|
| class B
| {
|   A a;
| }
|
| void main()
| {
|   B b;
|   with (b)
|   {
|     alias a.foo bar;
|   }
| }
|
| DMD 0.113 outputs:
|
| Assertion failure: '!scopesym || !scopesym->isWithScopeSymbol()' on
| line  2616 in file 'mtype.c'
|
| abnormal program termination

Added to DStress as
http://dstress.kuehne.cn/run/alias_15.d
http://dstress.kuehne.cn/run/alias_16.d

Note: This alias is treated as an type aliasing but should be treated as
an alias declaration.

Thomas

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFCFmVV3w+/yD4P9tIRAvF2AJ9lHZ1cD6s56u6H95x9JLVl9KZKawCfbFCD
uT/KVlfmJViIYaVK1qJIRJY=
=rHCW
-----END PGP SIGNATURE-----
Feb 18 2005