digitalmars.D.bugs - [Issue 7662] New: int[1u] not implicitly convertible to immutable
- d-bugmail puremagic.com (33/33) Mar 07 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7662
- d-bugmail puremagic.com (12/12) Jan 10 2013 http://d.puremagic.com/issues/show_bug.cgi?id=7662
http://d.puremagic.com/issues/show_bug.cgi?id=7662 Summary: int[1u] not implicitly convertible to immutable Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc Maybe related to issue 7661 I think the assignment at line 5 has to be valid, because int[1] is a value that gets copied to another immutable value: int[1] foo() { return [1]; } void bar(F)(F fun) { immutable x = fun(); // line 5 } void main() { bar(&foo); // line 8 } test.d(5): Error: cannot implicitly convert expression ((*fun)()) of type int[1u] to immutable(int)[] test.d(8): Error: template instance test.bar!(int[1u] function()) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 07 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7662 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |WORKSFORME 15:03:08 PST --- Works in 2.061+ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 10 2013