Bug 8110 – DMD tries to opCast when doing opEquals, and fails

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-05-16T13:48:09Z
Last change time
2024-12-13T17:59:59Z
Assigned to
No Owner
Creator
meh.
Moved to GitHub: dmd#17550 →

Attachments

IDFilenameSummaryContent-TypeSize
1105lol.dReduced testcaseapplication/octet-stream137
1107lol.d Reduced test case for weird cast behavior.application/octet-stream272

Comments

Comment #0 by meh — 2012-05-16T13:48:09Z
The attached code fails with the following errors: lol.d(14): Error: template instance opCast!(Object) opCast!(Object) does not match template declaration opCast(T : int) lol.d(14): Error: function expected before (), not a.opCast!(Object) of type void I've been told to open a bug about it, so here it is.
Comment #1 by meh — 2012-05-16T13:48:52Z
Created attachment 1105 Reduced testcase
Comment #2 by meh — 2012-05-19T04:13:54Z
If to avoid the first error I add an opCast!(Object), it works with == but fails in a weird way when casting. Following an attachment that shows said behavior.
Comment #3 by meh — 2012-05-19T04:16:56Z
Created attachment 1107 Reduced test case for weird cast behavior.
Comment #4 by robert.schadek — 2024-12-13T17:59:59Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17550 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB