[Issue 6794] New: [ICE] (expression.c 993) with inout
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 8 19:10:08 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6794
Summary: [ICE] (expression.c 993) with inout
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-10-08 19:09:21 PDT ---
This is wrong code:
struct Foo(T) {
void bar(T)(inout T x) {}
}
void main() {
Foo!int f;
f.bar(1);
}
With DMD 2.056head it crashes DMD that gives:
test.d(2): Error: inout on parameter means inout must be on return type as well
(if from D1 code, replace with 'ref')
test.d(2): Error: variable test.Foo!(int).Foo.bar!(int).bar.x inout variables
can only be declared inside inout functions
test.d(6): Error: template instance test.Foo!(int).Foo.bar!(int) error
instantiating
Assertion failure: 'tret->hasWild()' on line 993 in file 'expression.c'
--
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