summaryrefslogtreecommitdiff
path: root/test/files/pos/t1693.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2010-09-14 14:23:28 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2010-09-14 14:23:28 +0000
commit3b8129c77b9426a621163d4e5bf54943f58692a1 (patch)
treecfd3a9c7c28b0b135bd06d65275803770e5b99f5 /test/files/pos/t1693.scala
parent45b659cd413a1411c90cd27261d8260229f93898 (diff)
downloadscala-3b8129c77b9426a621163d4e5bf54943f58692a1.tar.gz
scala-3b8129c77b9426a621163d4e5bf54943f58692a1.tar.bz2
scala-3b8129c77b9426a621163d4e5bf54943f58692a1.zip
closes #1693: improve implicit conversion disam...
closes #1693: improve implicit conversion disambiguation by incorporating the expected type of the member that triggered the conversion back-ported fix by Martin in embeddings branch. review by odersky (just in case it shouldn't have been back-ported)
Diffstat (limited to 'test/files/pos/t1693.scala')
-rw-r--r--test/files/pos/t1693.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/t1693.scala b/test/files/pos/t1693.scala
new file mode 100644
index 0000000000..f3615f4756
--- /dev/null
+++ b/test/files/pos/t1693.scala
@@ -0,0 +1,9 @@
+object Test {
+ class Foo
+ class SomeOps(x : Foo) { def foo(x: String) = 1 }
+ class OtherOps(x : Foo) { def foo(x: Int) = 1 }
+ implicit def mkSomeOps(x: Foo) : SomeOps = new SomeOps(x)
+ implicit def mkOtherOps(x: Foo) : OtherOps = new OtherOps(x)
+
+ (new Foo).foo(1)
+} \ No newline at end of file