D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7907 - [ICE] invalid expression on template argument crashes dmd
Summary: [ICE] invalid expression on template argument crashes dmd
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2012-04-14 04:15 UTC by Kenji Hara
Modified: 2012-04-14 14:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2012-04-14 04:15:15 UTC
Following invalid code crashes dmd.

template Id(E)
{
    alias E Id;
}
template Id(alias E)
{
    alias E Id;
}

void main()
{
    //static assert(!__traits(compiles, { alias Id!([string.min]) X; }));
    alias Id!([string.min]) X;
}
Comment 2 github-bugzilla 2012-04-14 13:00:47 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/67207ff6a4a191daf1daff262bacbae240780a4d
fix Issue 7907 - [ICE] invalid expression on template argument crashes dmd

https://github.com/D-Programming-Language/dmd/commit/a8cf4207ca784652b802e5eec98ea94e5c7d33cf
Merge pull request #879 from 9rnsr/fix7907

Issue 7907 - [ICE] invalid expression on template argument crashes dmd