View mode: basic / threaded / horizontal-split · Log in · Help
October 09, 2011
[Issue 6794] New: [ICE] (expression.c 993) with inout
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@puremagic.com
       ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@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: -------
April 20, 2012
[Issue 6794] ICE(expression.c): with inout
http://d.puremagic.com/issues/show_bug.cgi?id=6794


SomeDude <lovelydear@mailmetrash.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |lovelydear@mailmetrash.com


--- Comment #1 from SomeDude <lovelydear@mailmetrash.com> 2012-04-20 16:43:30 PDT ---
Compiles and runs fine on 2.059 Win32

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 16, 2013
[Issue 6794] ICE(expression.c): with inout
http://d.puremagic.com/issues/show_bug.cgi?id=6794


yebblies <yebblies@gmail.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
            Status|NEW                         |RESOLVED
                CC|                            |yebblies@gmail.com
        Resolution|                            |WORKSFORME
          Severity|normal                      |critical


--- Comment #2 from yebblies <yebblies@gmail.com> 2013-01-17 02:01:32 EST ---
No crash for me with 2.062 head on win32.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home