Skip to content

Instantly share code, notes, and snippets.

@nagat01
Created September 2, 2024 14:00
Show Gist options
  • Save nagat01/cac50a559b8fc2351e99b4cd335d1e09 to your computer and use it in GitHub Desktop.
Save nagat01/cac50a559b8fc2351e99b4cd335d1e09 to your computer and use it in GitHub Desktop.
opaque type A = String
object A:
def apply(s: String): A = s
extension (p: A)
def show = s"opaque type A: $p"
@main def main =
println(A("a").show)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment