http://d.puremagic.com/issues/show_bug.cgi?id=6519
--- Comment #3 from Kenji Hara <[email protected]> 2011-08-31 10:30:12 PDT --- I think this is a duplication of bug 3748. With my patch (https://github.com/D-Programming-Language/dmd/pull/359), the sample code in comment #0 works correctly. (In reply to comment #2) > Should the following compile? > int[] x = foo([1,2,3]); > immutable(int[]) y = foo([1,2,3]); > const(int[]) z = foo([1,2,3]); D's literals work like polysemous value, but basically they have mutable types. static assert(is(typeof([1, 2]) == int[])); Therefore typeof(foo([1, 2])) equals to int[], and only y shouldn't compile, others should. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
