PSI Pattern Matching: Add equivalence tests for JetPsiUnifier

This commit is contained in:
Alexey Sedunov
2014-07-29 17:15:25 +04:00
parent a3758f9fa3
commit f1c18d0e3f
192 changed files with 3199 additions and 0 deletions
@@ -0,0 +1,24 @@
class A(val n: Int)
fun test() {
<selection>fun foo<T: A>(t: T): Int {
fun A.a(n: Int): Int = this.n + n
fun A.b(n: Int): Int = this.n - n
return t.n + A(1).a(2) - A(2).b(1)
}</selection>
fun foo<U: A>(u: U): Int {
fun A.x(m: Int): Int = n + m
fun A.y(n: Int): Int = this.n - n
return u.n + A(1).x(2) - A(2).y(1)
}
fun foo<V: A>(v: V): Int {
fun A.a(n: Int): Int = this.n + n
fun A.b(n: Int): Int = this.n + n
return v.n + A(1).a(2) - A(2).b(1)
}
}