erg/tests/should_err/class_attr.er
2023-06-08 22:17:52 +09:00

9 lines
131 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