more tests for resolve order

This commit is contained in:
Svetlana Isakova
2012-04-18 18:52:32 +04:00
parent e60aae5374
commit 8d6d292150
@@ -1,8 +1,10 @@
fun box() : String { fun box() : String {
if (!B().test()) return "fail 1"; if (!B().test()) return "fail 1";
if (!D().test()) return "fail 2" if (!D().test()) return "fail 2"
if (!F().test()) return "fail 3"
if (!L().test()) return "fail 4" if (!L().test()) return "fail 4"
if (!N().test()) return "fail 5" if (!H().test()) return "fail 5"
if (!N().test()) return "fail 6"
return "OK" return "OK"
} }
@@ -31,16 +33,26 @@ class D {
fun test() = C().bar() == 1 fun test() = C().bar() == 1
} }
class E
fun E.foo() = 2
class M class F {
fun M.foo() = 2 fun foo() = 1
class N { fun E.bar() = foo()
fun M.foo() = 1
fun M.bar() = foo() fun test() = E().bar() == 1
}
fun test() = M().bar() == 1 class G
fun G.foo() = 2
class H {
fun G.foo() = 1
fun G.bar() = foo()
fun test() = G().bar() == 1
} }
class K class K
@@ -51,3 +63,13 @@ class L {
} }
fun K.foo() = 1 fun K.foo() = 1
fun L.foo() = 2 fun L.foo() = 2
class M
class N {
fun foo() = 1
fun M.foo() = 2
fun M.bar() = foo()
fun test() = M().bar() == 1
}