Created
September 3, 2024 03:57
-
-
Save nagat01/ff724328c0caa41aeca9b0bea76c8700 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
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