forked from nim-lang/Nim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
even lighter version of nim-lang#17938: fix most issues with UnusedIm…
…port, XDeclaredButNotUsed, etc; fix nim-lang#17511, nim-lang#17510, nim-lang#14246 (without realModule) (nim-lang#18362) * {.used: symbol} * add tests * fix tests with --import * --import works without giving spurious unused warnings * new warning warnDuplicateModuleImport for `import foo; import foo` * fix test, add resolveModuleAlias, use proper line info for module aliases * fix spurious warnings * fix deprecation msg for deprecated modules even with `import foo as bar` * disable a test for i386 pending sorting XDeclaredButNotUsed errors * UnusedImport now works with re-exported symbols * fix typo [skip ci] * ic support * add genPNode to allow writing PNode-based compiler code similarly to `genAst` * fix DuplicateModuleImport warning * adjust test * fixup * fixup * fixup * fix after rebase * fix for IC * keep the proc inline, move the const out * [skip ci] fix changelog * experiment: remove calls to resolveModuleAlias * followup * fixup * fix tests/modules/tselfimport.nim * workaround tests/deprecated/tmodule1.nim * fix properly * simplify
- Loading branch information
1 parent
a19de93
commit c4f4896
Showing
13 changed files
with
155 additions
and
60 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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import std/strutils | ||
|
||
from std/os import fileExists | ||
|
||
import std/typetraits as typetraits2 | ||
from std/setutils import complement | ||
|
||
|
||
|
||
|
||
|
||
proc fn1() = discard | ||
proc fn2*() = discard | ||
|
||
|
||
let fn4 = 0 | ||
let fn5* = 0 | ||
|
||
|
||
const fn7 = 0 | ||
const fn8* = 0 | ||
|
||
type T1 = object |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import mused2c | ||
export mused2c | ||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
proc baz*() = discard |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
discard """ | ||
matrix: "--hint:all:off --hint:XDeclaredButNotUsed --path:." | ||
joinable: false | ||
nimoutFull: true | ||
nimout: ''' | ||
mused2a.nim(12, 6) Hint: 'fn1' is declared but not used [XDeclaredButNotUsed] | ||
mused2a.nim(16, 5) Hint: 'fn4' is declared but not used [XDeclaredButNotUsed] | ||
mused2a.nim(20, 7) Hint: 'fn7' is declared but not used [XDeclaredButNotUsed] | ||
mused2a.nim(23, 6) Hint: 'T1' is declared but not used [XDeclaredButNotUsed] | ||
mused2a.nim(1, 11) Warning: imported and not used: 'strutils' [UnusedImport] | ||
mused2a.nim(3, 9) Warning: imported and not used: 'os' [UnusedImport] | ||
mused2a.nim(5, 23) Warning: imported and not used: 'typetraits2' [UnusedImport] | ||
mused2a.nim(6, 9) Warning: imported and not used: 'setutils' [UnusedImport] | ||
tused2.nim(42, 8) Warning: imported and not used: 'mused2a' [UnusedImport] | ||
tused2.nim(45, 11) Warning: imported and not used: 'strutils' [UnusedImport] | ||
''' | ||
""" | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# line 40 | ||
|
||
import mused2a | ||
import mused2b | ||
|
||
import std/strutils | ||
baz() |
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 |
---|---|---|
|
@@ -271,7 +271,7 @@ block: | |
fails(foo) | ||
|
||
|
||
import macros, tables | ||
import tables | ||
|
||
var foo{.compileTime.} = [ | ||
"Foo", | ||
|