Details

Type: Bug

Status: Closed

Priority: Critical

Resolution: Fixed

Affects Version/s: Scala 2.11.0M1

Fix Version/s: Scala 2.11.0M8

Component/s: Type Checker

Labels:None
Description
Regressed in https://github.com/scala/scala/pull/1554
scalachash 3d248efcc~1 test.scala topic/2.11compat ~/code/spire scalachash 3d248efcc test.scala test.scala:13: error: reference to sqrt is ambiguous; it is both defined in object FastComplex and imported subsequently by import java.lang.Math.sqrt sqrt(0d) ^ one error found
package p trait NRoot[A] object `package` { final def sqrt(x: Double): Double = Math.sqrt(x) final def sqrt[A](a: A)(implicit ev: NRoot[A]): A = ??? } object FastComplex { import java.lang.Math.sqrt sqrt(0d) }
As seen in Spire: https://github.com/retronym/spire/tree/topic/2.11compat
/cc, just FYI, to Erik Osheim