Bug 10651 – Throwing non-Throwable object causes ICE

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-15T19:08:00Z
Last change time
2013-07-15T20:45:49Z
Keywords
ice, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-07-15T19:08:19Z
Code: void main() { alias T = int; throw new T(); // ICE } Output: test.d(4): Error: can only throw class objects derived from Throwable, not type int* assert statement.c(4894) cd
Comment #1 by k.hara.pg — 2013-07-15T19:14:50Z
Comment #2 by github-bugzilla — 2013-07-15T20:42:56Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4a3faa1be01d9518aa5286f686f8927689bc4d7d fix Issue 10651 - Throwing non-Throwable object causes ICE https://github.com/D-Programming-Language/dmd/commit/0627f87bbd34db8493d21c8d88c32fef49065980 Merge pull request #2350 from 9rnsr/fix10651 Issue 10651 - Throwing non-Throwable object causes ICE