You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to Scala2.12.4 (JavaHotSpot(TM) 64-BitServerVM, Java1.8.0_152).
Type in expressions for evaluation. Ortry:help.
scala>typeA= {
|defself:Option[String]
| }
defined typealiasA
scala>typeB= {
|defself:Option[AnyRef]
| }
defined typealiasB
scala>defconvert(ab: AwithB) = ab.ensuring { _.isInstanceOf[AnyRef] }
<console>:13:error: value ensuring is not a member of AwithBdefconvert(ab: AwithB) = ab.ensuring { _.isInstanceOf[AnyRef] }
^
Note that ensuring is an extension method defined in Predef
The text was updated successfully, but these errors were encountered:
Atry
changed the title
Implicit conversion does not work for mix-in type
Implicit conversion does not work for mix-in types
Dec 26, 2017
Note that
ensuring
is an extension method defined inPredef
The text was updated successfully, but these errors were encountered: