Newer
Older
zweic / tests / 4 / aj-02.zwei
@ajaggi ajaggi on 27 Dec 2005 550 bytes Added some testfiles
class List {
     Int isEmpty() { return this.isEmpty() }
     Int head() { return this.head() }
     List tail() { return this.tail() }
     List cons(Int x) { return this.cons(x) }
}

class Cons extends List {
     Int head;
     List tail;
     Int isEmpty() { return false }
     Int head() { return this.head }
     List tail() { return this.tail }
     List cons(Int x) { return new Cons(x, this) }
}

class Nil extends List {
     Int isEmpty() { return true }
     List cons(Int x) { return new Cons(x, this) }
}

{
	if ( "aaa" == "" ) {};
}