-
-
Save smarter/38c3f7e27130a3a76fe52dfaf90da97d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//> using scala 3.nightly | |
import scala.language.experimental.relaxedExtensionImports | |
object A: | |
extension (s: String) | |
def wow: Unit = println(s) | |
object B: | |
extension (i: Int) | |
def wow: Unit = println(i) | |
import A._ | |
import B._ | |
5.wow | |
"five".wow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment