JET-39 Process ?. correctly in the receiver types

This commit is contained in:
Andrey Breslav
2011-05-23 10:42:50 +04:00
parent 9d123b5c4f
commit dd612c74e3
8 changed files with 104 additions and 66 deletions
+6 -2
View File
@@ -3,7 +3,7 @@ fun <~T~T, ~E~E> `T`T.foo(x : `E`E, y : `A`A) : `T`T {
y `+`plus 1
y `+1`+ 1.0
this?.`-`minus<T>(this)
this?.minus<T>(this)
this
}
@@ -11,6 +11,10 @@ fun <~T~T, ~E~E> `T`T.foo(x : `E`E, y : `A`A) : `T`T {
~A~class A
~+1~fun `A`A.plus(a : Any) {
1.`foo`foo()
true.`!`foo()
1
}
@@ -28,4 +32,4 @@ fun test() {
val <~TT~T> `TT`T.foo : `TT`T
fun Int.foo() = this`:std::Int`
~foo~fun Int.foo() = this`:std::Int`