Skip to content

Commit 5aa31fa

Browse files
committed
Fix test
1 parent 9ea8877 commit 5aa31fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/pos/opaque.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Predef.{any2stringadd => _, _}
12
object opaquetypes {
23
opaque type Logarithm = Double
34

@@ -26,7 +27,10 @@ object usesites {
2627
val l = Logarithm(1.0)
2728
val l2 = Logarithm(2.0)
2829
val l3 = l * l2
29-
val l4 = l + l2
30+
val l4 = l + l2 // currently requires any2stringadd to be disabled because
31+
// as a contextual implicit this takes precedence over the
32+
// implicit scope implicit LogarithmOps.
33+
// TODO: Remove any2stringadd
3034
val d = l3.toDouble
31-
val l4: Logarithm = (1.0).asInstanceOf[Logarithm]
35+
val l5: Logarithm = (1.0).asInstanceOf[Logarithm]
3236
}

0 commit comments

Comments
 (0)