Menu

#171 strange type error on GADT field access

open
nobody
None
5
2006-05-08
2006-05-08
Rohan Hart
No

The following code throws this error:

Arguments (gadt.Term<T>(this)) do not fit:
gadt.Int<nice.lang.int> gadt.Less.a

----------------------------

package gadt;

interface Term<T> {
T value();
}

interface Int implements Term<int> {}
interface Bool implements Term<boolean> {}

class Less implements Bool {
Int a;
Int b;
value() = a.value < b.value;
}

Discussion


Log in to post a comment.