www.digitalmars.com         C & C++   DMDScript  

D - DMD 0.79 Crash (templates, abstract classes, inheritance)

  1: interface Interface(T) {
  2: 	void foo();
  3: }
  4:
  5: abstract class Abstract(T) : Interface!(T) {
  6:	void foo();
  7: }
  8:
  9: class Concrete(T) : Abstract!(T) {
10:	void foo() {}
11: }
12:
13: class Sub(T) : Concrete!(T) {
14: }
15:
16: int main() {
17: 	new Sub!(Object)();
18: 	return 0;
19: }

This crashes the compiler for me (winxp).
If i change "interface" to "abstract class" (1) it works, but no 
multiple inheritance.
If I change "void" to "abstract void" (6), i get:
collectionstmp.d: class Abstract interface function Interface.foo is not 
implemented
If i remove the templating and replace T with Object everywhere, I get 
the error
collectionstmp.d: class Abstract interface function Interface.foo is not 
implemented

Do abstract classes actually work?

Sam
Feb 10 2004