Jump to definition on import will open the imported module (#7155)

This commit is contained in:
Yuriy Glukhov 2018-01-31 18:39:01 +03:00 • committed by Andreas Rumpf
commit 60c7bbc8b7

View file

@ -11,7 +11,7 @@
import import
intsets, strutils, os, ast, astalgo, msgs, options, idents, rodread, lookups, intsets, strutils, os, ast, astalgo, msgs, options, idents, rodread, lookups,
semdata, passes, renderer, modulepaths semdata, passes, renderer, modulepaths, sigmatch
proc evalImport*(c: PContext, n: PNode): PNode proc evalImport*(c: PContext, n: PNode): PNode
proc evalFrom*(c: PContext, n: PNode): PNode proc evalFrom*(c: PContext, n: PNode): PNode
@ -149,7 +149,7 @@ proc myImportModule(c: PContext, n: PNode): PSym =
localError(n.info, errGenerated, "A module cannot import itself") localError(n.info, errGenerated, "A module cannot import itself")
if sfDeprecated in result.flags: if sfDeprecated in result.flags:
message(n.info, warnDeprecated, result.name.s) message(n.info, warnDeprecated, result.name.s)
#suggestSym(n.info, result, false) suggestSym(n.info, result, c.graph.usageSym, false)
proc impMod(c: PContext; it: PNode) = proc impMod(c: PContext; it: PNode) =
let m = myImportModule(c, it) let m = myImportModule(c, it)