www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19209] New: [ICE] variable cannot be of type void and

https://issues.dlang.org/show_bug.cgi?id=19209

          Issue ID: 19209
           Summary: [ICE] variable cannot be of type void and recursive
                    import
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: paolo.invernizzi gmail.com

DMD 2.081.2 on macOS
====

foo/bag.d

import foo.baz;
class Spam {
    void method;
}

--
foo/bar.d

import foo.bag;
--
foo/baz.d

import foo.bag;
class Spammed : Spam { override method() {} }

===
dmd -c -o-  -I.  foo/bar.d
foo/bag.d(5): Error: variable `bag.Spam.method` variables cannot be of type
void
Segmentation fault: 11

--
Aug 30 2018