fix https://github.com/nim-lang/RFCs/issues/311 remove unary slice (#16714)
This commit is contained in:
parent
3b80f0dc8e
commit
ad67bcf379
5 changed files with 9 additions and 16 deletions
|
|
@ -112,7 +112,7 @@ proc getTokenLenFromSource(conf: ConfigRef; ident: string; info: TLineInfo): int
|
|||
if ident[^1] == '=' and ident[0] in linter.Letters:
|
||||
if sourceIdent != "=":
|
||||
result = 0
|
||||
elif sourceIdent.len > ident.len and sourceIdent[..ident.high] == ident:
|
||||
elif sourceIdent.len > ident.len and sourceIdent[0..ident.high] == ident:
|
||||
result = ident.len
|
||||
elif sourceIdent != ident:
|
||||
result = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue