Bug 10938 – ICE on recursive instantiation in opDispatch

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-31T18:38:00Z
Last change time
2014-01-05T16:33:29Z
Keywords
ice, pull
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2013-08-31T18:38:28Z
----- class C { this() { this.opts["opts"] = 1; } auto opDispatch(string field : "opts")() { return this.opts; // should likely be a CT error instead } } void main() { } ----- Stack trace: 0018e610 00497af9 image00400000!FuncDeclaration::semantic3+0x1612 [C:\dmd-git\dmd2\src\dmd\src\func.c @ 1281] 0018e648 004951ee image00400000!TemplateInstance::semantic3+0xe9 [C:\dmd-git\dmd2\src\dmd\src\template.c @ 6915] 0018e680 00495c6f image00400000!TemplateInstance::trySemantic3+0x79 [C:\dmd-git\dmd2\src\dmd\src\template.c @ 5319] 0018e790 00494fd5 image00400000!TemplateInstance::semantic+0xa20 [C:\dmd-git\dmd2\src\dmd\src\template.c @ 5725] 0018e7a4 00418a8f image00400000!TemplateInstance::semantic+0x14 [C:\dmd-git\dmd2\src\dmd\src\template.c @ 5246] 0018e8d8 0042eaf4 image00400000!DotTemplateInstanceExp::semanticY+0x337 [C:\dmd-git\dmd2\src\dmd\src\expression.c @ 8125] 0018e948 0043c033 image00400000!Type::noMember+0x290 [C:\dmd-git\dmd2\src\dmd\src\mtype.c @ 2240] 0018ebb4 00417b74 image00400000!TypeClass::dotExp+0x974 [C:\dmd-git\dmd2\src\dmd\src\mtype.c @ 8717] 0018ece4 00416c55 image00400000!DotIdExp::semanticY+0xb07 [C:\dmd-git\dmd2\src\dmd\src\expression.c @ 7722] 0018ed00 00420e45 image00400000!DotIdExp::semantic+0x14 [C:\dmd-git\dmd2\src\dmd\src\expression.c @ 7391] 0018f070 004ce5bd image00400000!AssignExp::semantic+0x10a [C:\dmd-git\dmd2\src\dmd\src\expression.c @ 11046] 0018f090 004cee1e image00400000!ExpStatement::semantic+0x28 [C:\dmd-git\dmd2\src\dmd\src\statement.c @ 385] 0018f258 004a279e image00400000!CompoundStatement::semantic+0xcd [C:\dmd-git\dmd2\src\dmd\src\statement.c @ 623] 0018fa24 004bf9d1 image00400000!FuncDeclaration::semantic3+0x13c1 [C:\dmd-git\dmd2\src\dmd\src\func.c @ 1255] 0018fa9c 00440914 image00400000!AggregateDeclaration::semantic3+0x9c [C:\dmd-git\dmd2\src\dmd\src\struct.c @ 130] 0018facc 004051c5 image00400000!Module::semantic3+0xc1 [C:\dmd-git\dmd2\src\dmd\src\module.c @ 812] 0018ff0c 00405a61 image00400000!tryMain+0x2c67 [C:\dmd-git\dmd2\src\dmd\src\mars.c @ 1512] 0018ff48 0057ae2d image00400000!main+0x43 [C:\dmd-git\dmd2\src\dmd\src\mars.c @ 1725]
Comment #1 by k.hara.pg — 2013-11-20T21:36:18Z
Comment #2 by github-bugzilla — 2014-01-05T13:00:00Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d872976cb9de78de92a18079b9b90adfd502b7d9 fix Issue 10938 - ICE on recursive instantiation in opDispatch By fixing issue 10736 (314a1cca9ff56775b9e2a9cf81564135be0726b1), all of template instance semantic are reliably finished by the deferred mechanism. And it had removed the necessity of the code in `DotTemplateInstanceExp::semanticY` for the issue 4003. Therefore, just remove the unnecessary code to fix the ICE. https://github.com/D-Programming-Language/dmd/commit/cd8a42547187ae9cb8ff3593efd3ee7a88697e72 Merge pull request #2840 from 9rnsr/fix10938 Issue 10938 - ICE on recursive instantiation in opDispatch