peon/tests/namespaces.pn

8 lines
348 B
Plaintext

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);
print(version == 2); # We shadowed the name, but we can still access it as std.version
print(std.test == 0x60);