Bug 11627 – [CTFE] cannot cast dchar to char at compile time on AA assignment

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-27T17:57:00Z
Last change time
2013-12-05T01:03:37Z
Keywords
CTFE, pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-11-27T17:57:37Z
From: http://forum.dlang.org/post/[email protected] Test case: bool test() { char[ubyte] toCharTmp; dchar letter = 'A'; //char c = cast(char)letter; // OK toCharTmp[0] = cast(char)letter; // NG return true; } void main() { enum ct = test(); } Output: test.d(7): Error: cannot cast letter to char at compile time test.d(13): called from here: test()
Comment #1 by k.hara.pg — 2013-11-27T18:08:42Z
Comment #2 by github-bugzilla — 2013-11-30T13:21:12Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7832449ce04d430d851977e1cac2e5b9cd4e4ee5 fix Issue 11627 - [CTFE] cannot cast dchar to char at compile time on AA assignment https://github.com/D-Programming-Language/dmd/commit/f320b0f46448961231f84e8ec0f40f0b35384862 Merge pull request #2892 from 9rnsr/fix11627 Issue 11627 - [CTFE] cannot cast dchar to char at compile time on AA assignment