Bug 12016 – implicit immutable upcast becomes null in CTFE

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-27T22:33:00Z
Last change time
2014-02-01T04:50:42Z
Keywords
CTFE, pull
Assigned to
nobody
Creator
dlang-bugzilla

Comments

Comment #0 by dlang-bugzilla — 2014-01-27T22:33:46Z
///////////////////////////////// class Base { } class Sub : Base { } int f(immutable Base c) { assert(c); return 1; } enum i = f(new immutable Sub); ///////////////////////////////// The assert fails in DMD git but not 2.064.2.
Comment #1 by dlang-bugzilla — 2014-01-27T22:57:08Z
Comment #2 by k.hara.pg — 2014-01-27T23:39:29Z
Comment #3 by github-bugzilla — 2014-01-28T00:24:00Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0da9cbc205f860b9e46805f27f4400a4f1e101bf fix Issue 12016 - implicit immutable upcast becomes null in CTFE https://github.com/D-Programming-Language/dmd/commit/ce84f0b953027595cd570d0af0e1ab4c27473297 Merge pull request #3168 from 9rnsr/fix12016 [REG2.065a] Issue 12016 - implicit immutable upcast becomes null in CTFE
Comment #4 by github-bugzilla — 2014-02-01T04:50:42Z
Commit pushed to 2.065 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1ace7e9e1070732f430baa38b19e5462e64d6eec Merge pull request #3168 from 9rnsr/fix12016 [REG2.065a] Issue 12016 - implicit immutable upcast becomes null in CTFE