View previous topic :: View next topic |
Author |
Message |
Etherous
Joined: 05 Sep 2009 Posts: 6
|
Posted: Tue May 10, 2011 1:26 pm Post subject: Bug: Parser fails on associative arrays of delegates |
|
|
The following will cause poseidon's parser to fail when parsing a source file (attempted on v0.23 and r278):
Code: |
class Foo
{
static immutable void delegate()[string] BAR;
static this ()
{
BAR = cast(typeof(BAR))
["a":(){}
];
}
}
|
Edit: Upon further testing, it seems that any associative array literals will cause it to fail.
Edit: Problem only occurs if one attempts to cast the associative array |
|
Back to top |
|
|
Kuan Hsu
Joined: 15 Apr 2006 Posts: 143 Location: Taiwan
|
Posted: Sat Jun 11, 2011 7:13 pm Post subject: Re: Bug: Parser fails on associative arrays of delegates |
|
|
Etherous wrote: | The following will cause poseidon's parser to fail when parsing a source file (attempted on v0.23 and r278):
Code: |
class Foo
{
static immutable void delegate()[string] BAR;
static this ()
{
BAR = cast(typeof(BAR))
["a":(){}
];
}
}
|
Edit: Upon further testing, it seems that any associative array literals will cause it to fail.
Edit: Problem only occurs if one attempts to cast the associative array |
Fixed at rev.279 |
|
Back to top |
|
|
|