Deprecate the dot style for import paths (#8474)

This commit is contained in:
Oscar Nihlgård 2018-07-30 15:24:16 +02:00 • committed by Varriount
commit 5491f1f53b
3 changed files with 15 additions and 11 deletions

View file

@ -155,6 +155,7 @@ proc getModuleName*(conf: ConfigRef; n: PNode): string =
# hacky way to implement 'x / y /../ z':
result = renderTree(n, {renderNoComments}).replace(" ")
of nkDotExpr:
localError(conf, n.info, warnDeprecated, "using '.' instead of '/' in import paths")
result = renderTree(n, {renderNoComments}).replace(".", "/")
of nkImportAs:
result = getModuleName(conf, n.sons[0])