Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler: fix module alias resolution
- Loading branch information
1 parent
0a93d3b
commit 20f6cdc
Showing
3 changed files
with
21 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
import os | ||
import time as t | ||
import crypto.sha256 as s2 | ||
|
||
import ( | ||
math | ||
log as l | ||
crypto.sha512 as s5 | ||
) | ||
|
||
struct TestAliasInStruct { | ||
time t.Time | ||
} | ||
|
||
fn test_import() { | ||
assert os.O_RDONLY == os.O_RDONLY && | ||
t.month_days[0] == t.month_days[0] && | ||
s2.size == s2.size && | ||
math.pi == math.pi && | ||
l.INFO == l.INFO && | ||
s5.size == s5.size | ||
assert os.O_RDONLY == os.O_RDONLY && t.month_days[0] == t.month_days[0] && s2.size == s2.size && math.pi == math.pi && l.INFO == l.INFO && s5.size == s5.size | ||
} | ||
|
||
fn test_alias_in_struct_field() { | ||
a := TestAliasInStruct{ | ||
time: t.Time{ | ||
year: 2020 | ||
} | ||
} | ||
assert a.time.year == 2020 | ||
} |