diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-03-11 19:21:39 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-03-11 19:21:39 +0100 |
commit | 35aab357e2ad6ebe1d3b5196e592bba8a10bed83 (patch) | |
tree | 34c2941f136774e19533f70060ad9bac6bba326b /lib/system/helpers.nim | |
parent | 06f23572d0299883b55d44872da51d07e876072e (diff) | |
download | Nim-35aab357e2ad6ebe1d3b5196e592bba8a10bed83.tar.gz |
Less warnings in macros (#10799)
Diffstat (limited to 'lib/system/helpers.nim')
-rw-r--r-- | lib/system/helpers.nim | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/system/helpers.nim b/lib/system/helpers.nim index a7e47915e..fda38156b 100644 --- a/lib/system/helpers.nim +++ b/lib/system/helpers.nim @@ -1,17 +1,9 @@ -# helpers used system.nim and other modules, avoids code duplication while -# also minimizing symbols exposed in system.nim -# -# TODO: move other things here that should not be exposed in system.nim - -proc lineInfoToString(file: string, line, column: int): string = - file & "(" & $line & ", " & $column & ")" +# TODO: remove this file. It causes "declared but not used" warnings everywhere. type InstantiationInfo = tuple[filename: string, line: int, column: int] proc `$`(info: InstantiationInfo): string = - # The +1 is needed here - # instead of overriding `$` (and changing its meaning), consider explicit name. - lineInfoToString(info.fileName, info.line, info.column+1) + info.fileName & "(" & $info.line & ", " & $(info.column+1) & ")" proc isNamedTuple(T: type): bool = ## return true for named tuples, false for any other type. |