Commit a3f21a5
committed
unified: Support scoped imports
Scoped imports like 'import class B.C' are mapped to an AST of form
ImportDeclartion
pattern: NamePattern "C"
importedExpr: MemberAccessExpr
base: "B"
member: "C"
The NamePattern introduces a local alias for 'C', but unlike type aliases we also resolve to the ultimate target, when it's coming through an import.1 parent 0cf2871 commit a3f21a5
3 files changed
Lines changed: 14 additions & 0 deletions
File tree
- unified/ql
- lib/codeql/unified/internal
- test/library-tests/static-name-binding/package1/Sources
- Target1
- Target2
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments