Bug 13218 – [ICE] s2ir.c 142: Must fully qualify call to ParameterTypeTuple

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-27T19:57:00Z
Last change time
2014-08-22T08:05:05Z
Keywords
ice, pull
Assigned to
nobody
Creator
zshazz

Comments

Comment #0 by zshazz — 2014-07-27T19:57:40Z
The following code compiles on 2.065, but fails with "__error__\n\nInternal error: s2ir.c 142" on 2.066 b4 and b6 ```` void main() { Reduced r; } struct Reduced { private static string mangleFuncPtr(ArgTypes...)() { string result = "fnp_"; foreach(T; ArgTypes) result ~= T.mangleof; return result; } void function(int) fnp_i; double delegate(double) fnp_d; void opAssign(FnT)(FnT func) { import std.traits: ParameterTypeTuple; // Here's the problem line: mixin(mangleFuncPtr!(ParameterTypeTuple!FnT) ~ " = func;"); // Works: //mixin(mangleFuncPtr!(std.traits.ParameterTypeTuple!FnT) ~ " = func;"); } } ```` Note, as the comments say if you fully qualify std.traits.ParameterTypeTuple, it compiles and works just fine. (This is probably not reduced as much as possible, but it's a pretty small subset of the code in question. My apologies.) Interestingly, I have code elsewhere that does essentially the same call, but it doesn't need to be fully qualified to not crash the compiler.
Comment #1 by k.hara.pg — 2014-07-28T11:44:38Z
Comment #2 by github-bugzilla — 2014-07-29T06:03:19Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/29d0b5e3297f939b29ba04275a16f9bdcdfa885b fix Issue 13218 - [ICE] s2ir.c 142: Must fully qualify call to ParameterTypeTuple https://github.com/D-Programming-Language/dmd/commit/6633be7b765798fb32c207bf9e49082b6d2ebb5b Merge pull request #3821 from 9rnsr/fix13218 [REG2.066a] Issue 13218 - [ICE] s2ir.c 142: Must fully qualify call to ParameterTypeTuple
Comment #3 by github-bugzilla — 2014-07-31T02:35:19Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/5b0bead4d9e87d62d7736ed0f886834f80b22358 Merge pull request #3821 from 9rnsr/fix13218 [REG2.066a] Issue 13218 - [ICE] s2ir.c 142: Must fully qualify call to ParameterTypeTuple
Comment #4 by github-bugzilla — 2014-08-22T08:05:05Z