September 14, 2003 Segfault in compiler | ||||
---|---|---|---|---|
| ||||
linux dmd v0.71 the following code causes a seg fault (cyclic class in template) template TreeWalk( W, F ) { class BaseFactory : F { alias W delegate( F, ClassInfo ) getWalkDelegate; W getFrom( getWalkDelegate func, Object o ) { return func( this, o.classinfo ); } } } class Walker { } class Factory : instance TreeWalk( Walker, Factory ).BaseFactory { Walker getWalker( Factory f, ClassInfo ci ) { return null; } } int main( char[][] args ) { Factory f = new Factory(); Walker w = f.getFrom( f.getWalker, f ); return w.classinfo.name.length; } |
Copyright © 1999-2021 by the D Language Foundation