Commit Graph

10 Commits

Author SHA1 Message Date
Timothee Cour
b8f761b7e2 even lighter version of #17938: fix most issues with UnusedImport, XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 (without realModule) (#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
2021-06-26 15:21:46 +02:00
flywind
40b58a0a18 fix #11009 (#14935) 2020-07-09 09:57:35 +02:00
Timothee Cour
ec6e5681da fix #8063 by adding a testcase for: Deprecation warnings for enum values print twice (#10508) 2019-01-31 11:44:11 +01:00
Neelesh Chandola
fb26b95f81 {.deprecated: msg.} now works for vars and lets (#10234) 2019-01-08 19:44:47 +01:00
Neelesh Chandola
cbbdcb2669 Show deprecation warning for fields of a deprecated enum (#10112)
* Show deprecation warning for fields of a deprecated enum

* Add test
2018-12-30 09:45:39 +01:00
Arne Döring
1105d03644 require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
LemonBoy
cf20c4460c More robust handling of deprecated pragmas (#8696)
Prevent `deprecated` annotations to "slip" up to the parent module and
warn about unsupported annotations.

Accidentally fixes #7867
2018-08-21 15:07:44 +02:00
Araq
ee57bb3e3e fixes --gc:none regression; made some tests green 2015-03-10 12:32:47 +01:00
Araq
24ae0c387f some love for the testsuite; fixed regressions 2015-03-01 21:41:21 +01:00
Araq
20b5f31c03 new tester; all tests categorized 2014-01-13 02:10:03 +01:00