Merge pull request #11201 from nim-lang/araq-fixes-11200

fixes 11200
This commit is contained in:
Andreas Rumpf 2019-05-08 20:36:25 +02:00 • committed by GitHub
commit 641e8f596c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -663,7 +663,7 @@ proc compileCFiles(conf: ConfigRef; list: CFileList, script: var Rope, cmds: var
if optCompileOnly notin conf.globalOptions: if optCompileOnly notin conf.globalOptions:
add(cmds, compileCmd) add(cmds, compileCmd)
let (_, name, _) = splitFile(it.cname) let (_, name, _) = splitFile(it.cname)
add(prettyCmds, if hintCC in conf.notes: "CC: " & demaglePackageName(name) else: "") add(prettyCmds, if hintCC in conf.notes: "CC: " & demanglePackageName(name) else: "")
if optGenScript in conf.globalOptions: if optGenScript in conf.globalOptions:
add(script, compileCmd) add(script, compileCmd)
add(script, "\n") add(script, "\n")

View file

@ -43,7 +43,7 @@ proc fakePackageName*(conf: ConfigRef; path: AbsoluteFile): string =
result = relativeTo(path, conf.projectPath, '/').string.multiReplace( result = relativeTo(path, conf.projectPath, '/').string.multiReplace(
{"/": "7", "..": "_", "7": "77", "_": "__", ":": "8", "8": "88"}) {"/": "7", "..": "_", "7": "77", "_": "__", ":": "8", "8": "88"})
proc demaglePackageName*(path: string): string = proc demanglePackageName*(path: string): string =
result = path.multiReplace( result = path.multiReplace(
{"88": "8", "8": ":", "77": "7", "__": "_", "_7": "../", "7": "/"}) {"88": "8", "8": ":", "77": "7", "__": "_", "_7": "../", "7": "/"})

View file

@ -254,7 +254,7 @@ proc replaceTypeVarsS(cl: var TReplTypeVars, s: PSym): PSym =
# (e.g. skGenericParam and skType). # (e.g. skGenericParam and skType).
# Note: `s.magic` may be `mType` in an example such as: # Note: `s.magic` may be `mType` in an example such as:
# proc foo[T](a: T, b = myDefault(type(a))) # proc foo[T](a: T, b = myDefault(type(a)))
if s.kind in routineKinds or s.magic != mNone: if s.kind in routineKinds+{skLet, skConst, skVar} or s.magic != mNone:
return s return s
#result = PSym(idTableGet(cl.symMap, s)) #result = PSym(idTableGet(cl.symMap, s))