diff options
author | PMunch <peterme@peterme.net> | 2018-04-12 20:02:04 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-12 20:02:04 +0200 |
commit | 4f1725ad612da267fb9d70d209fe7b06a8a1c337 (patch) | |
tree | 9308624a21f7e6e6fb26ca86bdb68a529a6753da /compiler | |
parent | f543388959a4c74e4fa04e56d7e1961b5c44b4c0 (diff) | |
download | Nim-4f1725ad612da267fb9d70d209fe7b06a8a1c337.tar.gz |
Add column number to instantiation info (#7376)
* Add column number to instantiation info Instantiation info left out column number for no good reason. This adds it in as the third element of the tuple. * Fix test that failed and added change to changelog An assertion test failed because it was declaring a type that was expected to be populated by instantiationInfo with the old signature. Also added the changes to the changelog as it is a breaking change.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semmagic.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim index 189babdec..9031e4640 100644 --- a/compiler/semmagic.nim +++ b/compiler/semmagic.nim @@ -81,8 +81,11 @@ proc semInstantiationInfo(c: PContext, n: PNode): PNode = filename.strVal = if useFullPaths != 0: info.toFullPath else: info.toFilename var line = newNodeIT(nkIntLit, n.info, getSysType(tyInt)) line.intVal = toLinenumber(info) + var column = newNodeIT(nkIntLit, n.info, getSysType(tyInt)) + column.intVal = toColumn(info) result.add(filename) result.add(line) + result.add(column) proc toNode(t: PType, i: TLineInfo): PNode = result = newNodeIT(nkType, i, t) |