Summary: [ICE] (expression.c 993) with inout
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 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;;

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)!(int).bar.x inout variables
can only be declared inside inout functions
test.d(6): Error: template instance test.Foo!(int)!(int) error
Assertion failure: 'tret->hasWild()' on line 993 in file 'expression.c'

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to