Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala> :paste
- // Entering paste mode (ctrl-D to finish)
- trait A { def x = "foo" }
- object A { self: A => println(self.x) }
- // Exiting paste mode, now interpreting.
- <console>:8: error: type mismatch;
- found : A.type
- required: ?{def x: ?}
- Note that implicit conversions are not applicable because they are ambiguous:
- both method any2Ensuring in object Predef of type [A](x: A)Ensuring[A]
- and method any2ArrowAssoc in object Predef of type [A](x: A)ArrowAssoc[A]
- are possible conversion functions from A.type to ?{def x: ?}
- object A { self: A => println(self.x) }
- ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement