[Issue 8400] static array type cannot interpret dynamic array length
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 23 08:47:06 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8400
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #3 from bearophile_hugs at eml.cc 2012-07-23 08:47:04 PDT ---
> void main(){
> immutable a = [1,2];
> int[a.length+0] b; // ok
> int[a.length ] c; // error
> }
>
> The code should compile.
That code should not compile, in my opinion.
Nor this one:
immutable a = [1, 2];
void main() {
int[a.length] b;
}
See some discussion:
http://forum.dlang.org/thread/xjxkyokzwggfnrvmgziu@forum.dlang.org
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list