Skip to content

Instantly share code, notes, and snippets.

@smarter
Created May 11, 2023 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smarter/38c3f7e27130a3a76fe52dfaf90da97d to your computer and use it in GitHub Desktop.
Save smarter/38c3f7e27130a3a76fe52dfaf90da97d to your computer and use it in GitHub Desktop.
//> 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