diff options
author | Araq <rumpf_a@web.de> | 2018-08-09 20:31:40 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-08-09 20:31:40 +0200 |
commit | b4e5c9d075d9c2ef6192749b02738966b3dc943d (patch) | |
tree | 7ec3be9f252c116f2f30f022de7565953d96d2ac /compiler/pragmas.nim | |
parent | babd31360a93b1c17d33240c82391761e8419a95 (diff) | |
download | Nim-b4e5c9d075d9c2ef6192749b02738966b3dc943d.tar.gz |
deprecate the .this pragma
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r-- | compiler/pragmas.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index afe60e9dd..a067f2074 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -1066,8 +1066,10 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int, of wThis: if it.kind in nkPragmaCallKinds and it.len == 2: c.selfName = considerQuotedIdent(c, it[1]) + message(c.config, n.info, warnDeprecated, "the '.this' pragma") elif it.kind == nkIdent or it.len == 1: c.selfName = getIdent(c.cache, "self") + message(c.config, n.info, warnDeprecated, "the '.this' pragma") else: localError(c.config, it.info, "'this' pragma is allowed to have zero or one arguments") of wNoRewrite: |