Newer
Older
zweic / tests / four / expr_if.zwei
@glproj03 glproj03 on 28 Dec 2005 543 bytes wicked cool test file added: script.sh
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(3==2)"e1"else"e2"