We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 631f7c1 commit faa7078Copy full SHA for faa7078
tests/pending/pos/t8230a.scala
@@ -0,0 +1,26 @@
1
+trait Arr[T]
2
+object Arr {
3
+ def apply[T](xs: T): Arr[T] = null
4
+ def apply(x: Long) : Arr[Long] = null
5
+}
6
+
7
+object I {
8
+ implicit def arrToTrav[T] (a: Arr[T]) : Traversable[T] = null
9
+ implicit def longArrToTrav(a: Arr[Long]): Traversable[Long] = null
10
11
12
+object Test {
13
+ def foo(t: Traversable[Any]) = {}
14
15
+ object Okay {
16
+ Arr("1")
17
18
+ import I.{ arrToTrav, longArrToTrav }
19
+ foo(Arr("2"))
20
+ }
21
22
+ object Fail {
23
+ import I.arrToTrav
24
+ foo(Arr("3")) // found String, expected Long
25
26
0 commit comments