peon/tests/namespaces.pn

8 lines
348 B
Plaintext
Raw Permalink Normal View History

2022-11-27 14:34:09 +01:00
import std; # Defines a public "version" variable
print(std.version == 1);
print(version == std.version); # If there's no duplicates, the fully qualified name is optional
var version = 2; # Raises warning
print(std.version == 1);
2022-11-28 13:42:12 +01:00
print(version == 2); # We shadowed the name, but we can still access it as std.version
print(std.test == 0x60);