http://d.puremagic.com/issues/show_bug.cgi?id=8553
Summary: templated interface methods (virutal?) and linker missing symbols Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: michal.min...@gmail.com --- Comment #0 from Michal Minich <michal.min...@gmail.com> 2012-08-15 13:59:27 PDT --- module main; class Visitor (T) { void visit (KlazzDeriv) { } } interface IKlazz { void accept (R) (Visitor!(R)); } abstract class Klazz : IKlazz { // uncomment this to get "non-virtual functions cannot be abstract" // abstract void accept (R) (Visitor!(R)); // uncomment this line to compile // void accept (R) (Visitor!(R) v) { } } class KlazzDeriv : Klazz { void accept (R) (Visitor!(R) v) { v.visit(this); } } void main () { // change Klazz to KlazzDeriv and it compiles Klazz k = new KlazzDeriv; // is accept virtual call ? is it supported for templated interface methods ? k.accept (new Visitor!int); } dmd 2.060 on both systems On 64 bit linux main.o: In function `_Dmain': main.d:25: undefined reference to `_D4main6IKlazz13__T6acceptTiZ6acceptMFC4main14__T7VisitorTiZ7VisitorZv' collect2: error: ld returned 1 exit status on 32 bit win xp OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html main.obj(main) Error 42: Symbol Undefined _D4main6IKlazz13__T6acceptTiZ6acceptMFC4main14__T7VisitorTiZ7VisitorZv --- errorlevel 1 demangled missing symbol is void main.IKlazz.accept!(int).accept(main.Visitor!(int).Visitor) are currently templated virutal members supprted? Anyway ... it should not result in linker error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------