diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-15 09:37:45 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-15 15:08:22 +0200 |
commit | 12ba8af12b7157f7f8c4ff6e106f4b30b0bd472a (patch) | |
tree | cf9a26419479864a06d6e18e6a864244af48d60f | |
parent | 62531258003dba513a21847d58395823d6840363 (diff) | |
download | dotty-12ba8af12b7157f7f8c4ff6e106f4b30b0bd472a.tar.gz dotty-12ba8af12b7157f7f8c4ff6e106f4b30b0bd472a.tar.bz2 dotty-12ba8af12b7157f7f8c4ff6e106f4b30b0bd472a.zip |
Additions to test
-rw-r--r-- | tests/pos/overloaded.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pos/overloaded.scala b/tests/pos/overloaded.scala index 6a8e72714..56cfbccef 100644 --- a/tests/pos/overloaded.scala +++ b/tests/pos/overloaded.scala @@ -47,4 +47,13 @@ object overloaded { val t5: Int = r5 val r6 = combine((x: String, y) => x ++ y.toString) val t6: String = r6 + + // test result disambiguation + trait A + trait B + class C extends A with B + def fr(x: A): A = x + def fr(x: B): B = x + val a: A = fr(new C) + val b: B = fr(new C) } |