blob: b283f13338428acb22812f805d35057c2795cb60 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
class Poly {
class E
object E {
implicit def conv(value: Any): E = sys.error("")
}
}
object MyApp {
val r: Poly = sys.error("")
val s: Poly = sys.error("")
val b: r.E = sys.error("")
// okay
s.E.conv(b): s.E
// compilation fails with error below
println(b: s.E)
// amb prefix: MyApp.s.type#class E MyApp.r.type#class E
// amb prefix: MyApp.s.type#class E MyApp.r.type#class E
// ../test/pending/run/t5310.scala:17: error: type mismatch;
// found : MyApp.r.E
// required: MyApp.s.E
// println(b: s.E)
// ^
// The type error is as expected, but the `amb prefix` should be logged,
// rather than printed to standard out.
}
|