mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-07 21:25:31 +00:00
15 lines
251 B
Python
15 lines
251 B
Python
.x: Int
|
|
.f: Int -> Int
|
|
|
|
.C: ClassType
|
|
# or .C.__call__: Int -> .C
|
|
.C.__call__: (x: Int) -> .C
|
|
.C.f: (self: .C, y: Int) -> Int
|
|
|
|
#[
|
|
# Class declaration syntax
|
|
.C: ClassType {.x = Int}
|
|
.C.
|
|
__call__: (x: Int) -> .C
|
|
f: (self: .C, y: Int) -> Int
|
|
]#
|