D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8110 - DMD tries to opCast when doing opEquals, and fails
Summary: DMD tries to opCast when doing opEquals, and fails
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-16 13:48 UTC by meh.
Modified: 2024-12-13 17:59 UTC (History)
0 users

See Also:


Attachments
Reduced testcase (137 bytes, application/octet-stream)
2012-05-16 13:48 UTC, meh.
Details
Reduced test case for weird cast behavior. (272 bytes, application/octet-stream)
2012-05-19 04:16 UTC, meh.
Details

Note You need to log in before you can comment on or make changes to this issue.
Description meh. 2012-05-16 13:48:09 UTC
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 meh. 2012-05-16 13:48:52 UTC
Created attachment 1105 [details]
Reduced testcase
Comment 2 meh. 2012-05-19 04:13:54 UTC
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 meh. 2012-05-19 04:16:56 UTC
Created attachment 1107 [details]
 Reduced test case for weird cast behavior.
Comment 4 dlangBugzillaToGithub 2024-12-13 17:59:59 UTC
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