February 06, 2007 [Issue 933] New: Literal tuple parameters fails to compile when inout is mentioned | ||||
---|---|---|---|---|
| ||||
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. -- |
April 05, 2007 [Issue 933] Literal tuple parameters fails to compile when inout is mentioned | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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 -- |
Copyright © 1999-2021 by the D Language Foundation