Skip to content

Instantly share code, notes, and snippets.

@nagat01
Created September 3, 2024 03:57
Show Gist options
  • Save nagat01/ff724328c0caa41aeca9b0bea76c8700 to your computer and use it in GitHub Desktop.
Save nagat01/ff724328c0caa41aeca9b0bea76c8700 to your computer and use it in GitHub Desktop.
opaque type A = Int
object A:
def apply(x: Int): A = x + 10
extension (x: A)
def toInt: Int = x - 10
@main def main =
println(A(100).toInt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment