Bug 20598 – AssertError@dmd/optimize.d(692): Assertion failure

Status
RESOLVED
Resolution
WORKSFORME
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-02-22T22:57:02Z
Last change time
2022-07-15T21:49:15Z
Keywords
ice-on-invalid-code
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2020-02-22T22:57:02Z
Reduced test: TemplateInstance[TemplateInstanceBox] instances; class TemplateInstance { bool equalsx() { } final toHash() { } } struct TemplateInstanceBox { TemplateInstance ti; bool opEquals(ref const TemplateInstanceBox s) const { (cast()s.ti).equalsx; } }
Comment #1 by razvan.nitu1305 — 2022-07-14T12:15:17Z
Running this example with the latest master yields: test.d(9): Error: function `test.TemplateInstance.toHash` return type inference is not supported if may override base class function Which looks correct. The ice does not manifest anymore. Closing as WORKSFORME.
Comment #2 by ibuclaw — 2022-07-15T21:49:15Z
Tests are always good to prevent regressions. :-)