D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7545 - ICE(cast.c) Merge integral types through alias this
Summary: ICE(cast.c) Merge integral types through alias this
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: yebblies
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2012-02-19 07:46 UTC by Benjamin Thaut
Modified: 2012-02-19 13:10 UTC (History)
2 users (show)

See Also:


Attachments
repro case (272 bytes, application/octet-stream)
2012-02-19 07:46 UTC, Benjamin Thaut
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Benjamin Thaut 2012-02-19 07:46:30 UTC
Created attachment 1077 [details]
repro case

See attached repro case
Comment 1 yebblies 2012-02-19 07:51:35 UTC
Reduced:

struct S7545
{
    uint id;
    alias id this;
}

void test7545()
{
    auto id = 0 ? S7545() : -1;
}

Workaround:

auto id = 0 ? S7545() : cast(uint)-1;
Comment 3 github-bugzilla 2012-02-19 12:23:57 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5da25b1cfd43d9fd61cc2a3ecba7d6388735ab1c
Merge pull request #740 from yebblies/issue7545

Issue 7545 - ICE(cast.c) Merge integral types through alias this