Created
December 23, 2019 19:27
-
-
Save djspiewak/d7ba382f9d80be123699698ebb9ccd32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo { | |
def bar(i: Int): String = i.toString | |
} | |
object Foo { | |
implicit class Syntax(val self: Foo) extends AnyVal { | |
def baz(b: Boolean): String = b.toString | |
} | |
} | |
val f = new Foo | |
f.bar(42) // => "42" | |
f.baz(true) // => "true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment