mirror of
https://github.com/erg-lang/erg.git
synced 2025-12-23 05:36:48 +00:00
14 lines
173 B
Python
14 lines
173 B
Python
C = Class { .x = Int; .y = Int }
|
|
C.
|
|
x = "aa"
|
|
|
|
_: Str = C.x
|
|
_ = C.y # ERR
|
|
c = C.new({.x = 1; .y = 2})
|
|
_: Int = c.x
|
|
_: Int = c.y
|
|
|
|
D = Class()
|
|
D.
|
|
x = y # ERR
|
|
y = 1
|