Resolve for receiver-properties (generic arguments are not supported)

This commit is contained in:
Andrey Breslav
2011-05-20 18:06:59 +04:00
parent 3e0141ada4
commit 0afddb4d9e
4 changed files with 46 additions and 5 deletions
+11 -1
View File
@@ -18,4 +18,14 @@ fun <~T~T, ~E~E> `T`T.foo(x : `E`E, y : `A`A) : `T`T {
1
}
~-~fun <T> T.minus(t : T) : Int = 1
~-~fun <T> T.minus(t : T) : Int = 1
fun test() {
val y = 1.`abs`abs
}
~abs~val Int.abs : Int
get() = if (this`:std::Int` > 0) this else -this`:std::Int`;
val <~TT~T> `TT`T.foo : `TT`T
fun Int.foo() = this`:std::Int`