Generic Interfaces and Bounding
Monkey Forums/Monkey Programming/Generic Interfaces and Bounding
| ||
How hard is it to add generic support to interfaces? Example: Interface Foo<T> Method Bar:Void(arg:T) End Class StringTest Implements Foo<StringObject> Method Bar:Void(arg:StringObject) End End Also, is it possible to add bounding? Example: Class Foo End Class Bar Extends Foo End Class Test<T Extends Foo> Method SomeMethod:Void(arg:T) End End New Test<Bar> ' this compiles New Test<Foo> ' this compiles New Test<StringObject> ' this doesn't compile |