the compiler uses tyAlias internally; tester compiles again

This commit is contained in:
Araq 2016-11-16 00:13:45 +01:00
commit 0e1304a3e2
6 changed files with 49 additions and 24 deletions

View file

@ -190,21 +190,24 @@ proc freshLineInfo(p: BProc; info: TLineInfo): bool =
result = true
proc genLineDir(p: BProc, t: PNode) =
var line = t.info.safeLineNm
let info = t.info
#if t.kind in nkCallKinds+{nkStmtListExpr} and t.len > 1: t[1].info
#else: t.info
var line = info.safeLineNm
if optEmbedOrigSrc in gGlobalOptions:
add(p.s(cpsStmts), ~"//" & t.info.sourceLine & rnl)
genCLineDir(p.s(cpsStmts), t.info.toFullPath, line)
add(p.s(cpsStmts), ~"//" & info.sourceLine & rnl)
genCLineDir(p.s(cpsStmts), info.toFullPath, line)
if ({optStackTrace, optEndb} * p.options == {optStackTrace, optEndb}) and
(p.prc == nil or sfPure notin p.prc.flags):
if freshLineInfo(p, t.info):
if freshLineInfo(p, info):
linefmt(p, cpsStmts, "#endb($1, $2);$n",
line.rope, makeCString(toFilename(t.info)))
line.rope, makeCString(toFilename(info)))
elif ({optLineTrace, optStackTrace} * p.options ==
{optLineTrace, optStackTrace}) and
(p.prc == nil or sfPure notin p.prc.flags) and t.info.fileIndex >= 0:
if freshLineInfo(p, t.info):
(p.prc == nil or sfPure notin p.prc.flags) and info.fileIndex >= 0:
if freshLineInfo(p, info):
linefmt(p, cpsStmts, "nimln($1, $2);$n",
line.rope, t.info.quotedFilename)
line.rope, info.quotedFilename)
proc postStmtActions(p: BProc) {.inline.} =
add(p.s(cpsStmts), p.module.injectStmt)