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
Reduced example: class Spam { int method; } class Spammer : Spam { override method() {} } The problem is that `method` is trying to override a field.
PR : https://github.com/dlang/dmd/pull/8665
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/bfd48f4a56bacfb8f01e6be27833e675b62eab7e Fix Issue 19209 - [ICE] Overriding a field in a baseclass issues an ICE https://github.com/dlang/dmd/commit/35558bd524e519d6ef58253e56f47cdc663a6593 Merge pull request #8665 from RazvanN7/Issue_19209 Fix Issue 19209 - [ICE] Overriding a field in a baseclass issues an ICE merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>