blob: 3bfe604341a3b7baee7ec3f3dd326e81aadc1e6f (
plain) (
tree)
|
|
package test
import dotty._
import Predef.{any2stringadd => _, StringAdd => _, _}
object implicitDefs {
implicit val x = 2 // error: type of implicit definition needs to be given explicitly
implicit def y(x: Int) = 3 // error: result type of implicit definition needs to be given explicitly
implicit def z(a: x.type): String = "" // error: implicit conversion may not have a parameter of singleton type
def foo(implicit x: String) = 1
def bar() = {
implicit val x = foo // error: cyclic reference
x
}
}
|