mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
compiler: minor code cleanups
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
## do a compile-time copy-on-write analysis.
|
||||
|
||||
import
|
||||
ast, types, renderer, idents, intsets, options, msgs
|
||||
ast, types, renderer, idents, intsets, options
|
||||
|
||||
type
|
||||
Cursor = object
|
||||
|
||||
@@ -187,10 +187,9 @@ proc impMod(c: PContext; it: PNode; importStmtResult: PNode) =
|
||||
let it = transformImportAs(c, it)
|
||||
let m = myImportModule(c, it, importStmtResult)
|
||||
if m != nil:
|
||||
var emptySet: IntSet
|
||||
# ``addDecl`` needs to be done before ``importAllSymbols``!
|
||||
addDecl(c, m, it.info) # add symbol to symbol table of module
|
||||
importAllSymbolsExcept(c, m, emptySet)
|
||||
importAllSymbols(c, m)
|
||||
#importForwarded(c, m.ast, emptySet, m)
|
||||
|
||||
proc evalImport*(c: PContext, n: PNode): PNode =
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
## https://github.com/nim-lang/RFCs/issues/244 for more details.
|
||||
|
||||
import
|
||||
ast, types, renderer, idents, intsets, options, msgs
|
||||
ast, types, renderer, idents, intsets
|
||||
|
||||
proc canAlias(arg, ret: PType; marker: var IntSet): bool
|
||||
|
||||
|
||||
@@ -558,7 +558,7 @@ proc markUsed(c: PContext; info: TLineInfo; s: PSym) =
|
||||
warnAboutDeprecated(conf, info, s)
|
||||
if {sfDeprecated, sfError} * s.flags != {}:
|
||||
if sfDeprecated in s.flags:
|
||||
if not (c.lastTLineInfo.line == info.line and
|
||||
if not (c.lastTLineInfo.line == info.line and
|
||||
c.lastTLineInfo.col == info.col):
|
||||
warnAboutDeprecated(conf, info, s)
|
||||
c.lastTLineInfo = info
|
||||
|
||||
Reference in New Issue
Block a user