Bug 11485 – [e2ir] Error in e2ir at numeric/bool to class/interface cast

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-09T10:38:00Z
Last change time
2013-11-23T07:03:41Z
Keywords
accepts-invalid, ice, pull
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2013-11-09T10:38:47Z
--- void main() { int i; auto o = cast(Object) i; } --- main.d(4): Error: e2ir: cannot cast i of type int to type object.Object ---
Comment #1 by maxim — 2013-11-09T11:51:25Z
First of all, the issue is likely to be resolved-invalid because idea of conversion (even explicit) from int to class is bogus: such cast cannot produce any meaningfull value. In D there is no boxing like in C#. Secondly, this is not an ICE. ICE is a compiler crash and internal error message in a sence of failed assertions. Rejects-valid is a more appropriate tag.
Comment #2 by verylonglogin.reg — 2013-11-09T12:55:47Z
Sorry for insufficient description. The issue is only about the ICE. And e2ir errors are ICEs.
Comment #3 by yebblies — 2013-11-16T20:10:14Z
Comment #4 by yebblies — 2013-11-23T05:44:22Z
*** Issue 9277 has been marked as a duplicate of this issue. ***
Comment #5 by github-bugzilla — 2013-11-23T06:58:26Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/246e05627b84846d4c3c1136f76bf4b7b540ecb3 Fix Issue 11485 - [e2ir] Error in e2ir at numeric/bool to class/interface cast https://github.com/D-Programming-Language/dmd/commit/3b24bdc4abc36adb0c790f04e9adb28c3bc09af9 Merge pull request #2788 from yebblies/issue11485 Issue 11485 - [e2ir] Error in e2ir at numeric/bool to class/interface cast