mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fixes #24998
Basically it retraces back to the situation before
https://github.com/nim-lang/Nim/pull/18366 and
https://github.com/nim-lang/Nim/pull/18362, i.e.
```nim
import fuzz/a
import fuzz/a
```
```nim
import fuzz/a
from buzz/a
```
```nim
import fuzz/a except nil
from fuzz/a import addInt
```
All of these cases are now flagged as invalid and triggers a
redefinition error, i.e., each module name importing is treated as
consistent as the symbol definition
kinda annoying for importing/exporting with `when conditions` though
ref https://github.com/nim-lang/Nim/issues/18762
https://github.com/nim-lang/Nim/issues/20907
```nim
from std/strutils import toLower
when not defined(js):
from std/strutils import toUpper
```
(cherry picked from commit 87ee9c84cb)
68 lines
1.1 KiB
Nim
68 lines
1.1 KiB
Nim
# Special configuration file for the Nim project
|
|
|
|
hint[XDeclaredButNotUsed]:off
|
|
|
|
define:booting
|
|
define:nimcore
|
|
define:nimPreviewSlimSystem
|
|
define:nimPreviewCstringConversion
|
|
define:nimPreviewProcConversion
|
|
define:nimPreviewRangeDefault
|
|
define:nimPreviewNonVarDestructor
|
|
define:nimPreviewCheckedClose
|
|
define:nimPreviewAsmSemSymbol
|
|
define:nimPreviewCStringComparisons
|
|
define:nimPreviewDuplicateModuleError
|
|
|
|
threads:off
|
|
|
|
#import:"$projectpath/testability"
|
|
|
|
@if windows:
|
|
cincludes: "$lib/wrappers/libffi/common"
|
|
@end
|
|
|
|
define:useStdoutAsStdmsg
|
|
|
|
@if nimHasStyleChecks:
|
|
styleCheck:error
|
|
@end
|
|
|
|
|
|
#define:useNodeIds
|
|
#gc:markAndSweep
|
|
|
|
@if nimHasWarningObservableStores:
|
|
warning[ObservableStores]:off
|
|
@end
|
|
|
|
|
|
@if nimHasWarningAsError:
|
|
warningAsError[GcUnsafe2]:on
|
|
@end
|
|
|
|
@if nimHasWarnUnnamedBreak:
|
|
warningAserror[UnnamedBreak]:on
|
|
@end
|
|
|
|
@if nimHasWarnBareExcept:
|
|
warning[BareExcept]:on
|
|
warningAserror[BareExcept]:on
|
|
@end
|
|
|
|
|
|
@if nimUseStrictDefs:
|
|
experimental:strictDefs
|
|
warningAsError[Uninit]:on
|
|
warningAsError[ProveInit]:on
|
|
@end
|
|
|
|
@if nimHasWarnStdPrefix:
|
|
warning[StdPrefix]:on
|
|
warningAsError[StdPrefix]:on
|
|
@end
|
|
|
|
@if nimHasVtables:
|
|
experimental:vtables
|
|
@end
|