Added test for namespace shadowing
This commit is contained in:
parent
582d29d149
commit
de981a2ec6
|
@ -0,0 +1,7 @@
|
|||
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
|
Loading…
Reference in New Issue