digitalmars.D.bugs - [Issue 933] New: Literal tuple parameters fails to compile when inout is mentioned
- d-bugmail puremagic.com (30/30) Feb 06 2007 http://d.puremagic.com/issues/show_bug.cgi?id=933
- d-bugmail puremagic.com (6/6) Apr 05 2007 http://d.puremagic.com/issues/show_bug.cgi?id=933
http://d.puremagic.com/issues/show_bug.cgi?id=933 Summary: Literal tuple parameters fails to compile when inout is mentioned Product: D Version: 1.004 Platform: PC OS/Version: Linux Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: korslund gmail.com struct Foo(T...) { void set(T t) {} // Comment out this and it works fine void get(inout T t) {} } void main() { Foo!(int) foo; foo.set(5); } Compiling (with DMD 1.005 on linux) gives: Error: constant 5 is not an lvalue even though foo.set() does NOT have inout parameters. Removing the get() method solves the problem. --
Feb 06 2007
http://d.puremagic.com/issues/show_bug.cgi?id=933 ------- Comment #1 from thomas-dloop kuehne.cn 2007-04-05 11:38 ------- Added to DStress as http://dstress.kuehne.cn/run/t/tuple_20_A.d http://dstress.kuehne.cn/run/t/tuple_20_B.d --
Apr 05 2007