mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-07 21:25:31 +00:00
20 lines
354 B
Python
20 lines
354 B
Python
a11y = import "a11y"
|
|
C = a11y.C
|
|
|
|
print! a11y.public
|
|
# print! a11y.private # error: private variable
|
|
print! a11y.C.x
|
|
c = a11y.C.new {.x = 0}
|
|
print! c.x
|
|
|
|
id c: C = c
|
|
print! id(c) == c
|
|
|
|
consts = import "consts"
|
|
print! consts.physics.G
|
|
|
|
foo = import "foo"
|
|
assert foo.i == 1
|
|
assert foo.f(2) == 3
|
|
assert foo.FILE == "foo/__init__.er"
|
|
assert foo.bar.i == foo.i
|