Bug 18237 – ICE with templated classes

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-01-14T16:36:04Z
Last change time
2018-01-14T17:15:05Z
Assigned to
No Owner
Creator
Temtaime

Attachments

IDFilenameSummaryContent-TypeSize
1676src.reduced.zipsource code dustmitedapplication/x-zip-compressed1367

Comments

Comment #0 by temtaime — 2018-01-14T16:36:04Z
Created attachment 1676 source code dustmited $ find '.' -name '*.d' -exec dmd {} + .\dmd\transitivevisitor.d(10): Error: function visitor.SemanticTimeTransitiveVisitor.ParseVisitMethods!(ASTCodegen).visit return type inference is not supported if may override base class function object.Error@(0): Access Violation
Comment #1 by temtaime — 2018-01-14T16:42:58Z
dmd dmd/visitor.d works too
Comment #2 by temtaime — 2018-01-14T16:45:25Z
btw: adding void as return type to visit makes the error go away and only crash rests
Comment #3 by temtaime — 2018-01-14T17:00:51Z
One file bug: class Visitor : ParseTimeVisitor!ASTCodegen { } class SemanticTimePermissiveVisitor : Visitor { } class SemanticTimeTransitiveVisitor : SemanticTimePermissiveVisitor { mixin ParseVisitMethods!ASTCodegen ; } template ParseVisitMethods(AST) { override void visit() { } } extern (C++) class ParseTimeVisitor(AST) { void visit() { } } struct ASTCodegen { } By the way : seems to crash only on windows(?)
Comment #4 by temtaime — 2018-01-14T17:15:05Z
Seems to be dup of 18093 and fixed in master