← Back to index
|
Original Bugzilla link
Bug 19209 – [ICE] Overriding a field in a baseclass issues an ICE
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-08-30T20:55:01Z
Last change time
2018-09-07T05:35:12Z
Assigned to
No Owner
Creator
Paolo Invernizzi
Comments
Comment #0
by paolo.invernizzi — 2018-08-30T20:55:01Z
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
Comment #1
by razvan.nitu1305 — 2018-09-05T13:46:05Z
Reduced example: class Spam { int method; } class Spammer : Spam { override method() {} } The problem is that `method` is trying to override a field.
Comment #2
by razvan.nitu1305 — 2018-09-05T13:54:16Z
PR :
https://github.com/dlang/dmd/pull/8665
Comment #3
by github-bugzilla — 2018-09-07T05:35:11Z
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 <
[email protected]
>