fixes linter regressions
This commit is contained in:
parent
dc0bbba3fa
commit
73cc029fec
4 changed files with 15 additions and 3 deletions
|
|
@ -320,6 +320,7 @@ proc semIdentDef(c: PContext, n: PNode, kind: TSymKind): PSym =
|
||||||
result = semIdentWithPragma(c, kind, n, {})
|
result = semIdentWithPragma(c, kind, n, {})
|
||||||
if result.owner.kind == skModule:
|
if result.owner.kind == skModule:
|
||||||
incl(result.flags, sfGlobal)
|
incl(result.flags, sfGlobal)
|
||||||
|
result.options = c.config.options
|
||||||
|
|
||||||
proc getLineInfo(n: PNode): TLineInfo =
|
proc getLineInfo(n: PNode): TLineInfo =
|
||||||
case n.kind
|
case n.kind
|
||||||
|
|
|
||||||
|
|
@ -720,6 +720,7 @@ proc semRecordNodeAux(c: PContext, n: PNode, check: var IntSet, pos: var int,
|
||||||
suggestSym(c.config, n.sons[i].info, f, c.graph.usageSym)
|
suggestSym(c.config, n.sons[i].info, f, c.graph.usageSym)
|
||||||
f.typ = typ
|
f.typ = typ
|
||||||
f.position = pos
|
f.position = pos
|
||||||
|
f.options = c.config.options
|
||||||
if fieldOwner != nil and
|
if fieldOwner != nil and
|
||||||
{sfImportc, sfExportc} * fieldOwner.flags != {} and
|
{sfImportc, sfExportc} * fieldOwner.flags != {} and
|
||||||
not hasCaseFields and f.loc.r == nil:
|
not hasCaseFields and f.loc.r == nil:
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,14 @@ tlinter.nim(25, 1) Hint: 'tyPE' should be: 'type' [Name]
|
||||||
tlinter.nim(23, 1) Hint: 'foO' should be: 'foo' [Name]
|
tlinter.nim(23, 1) Hint: 'foO' should be: 'foo' [Name]
|
||||||
tlinter.nim(27, 14) Hint: 'Foo_bar' should be: 'FooBar' [Name]
|
tlinter.nim(27, 14) Hint: 'Foo_bar' should be: 'FooBar' [Name]
|
||||||
tlinter.nim(29, 6) Hint: 'someVAR' should be: 'someVar' [Name]
|
tlinter.nim(29, 6) Hint: 'someVAR' should be: 'someVar' [Name]
|
||||||
|
tlinter.nim(32, 7) Hint: 'i_fool' should be: 'iFool' [Name]
|
||||||
|
tlinter.nim(39, 5) Hint: 'meh_field' should be: 'mehField' [Name]
|
||||||
'''
|
'''
|
||||||
action: "compile"
|
action: "compile"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{.pragma: myOwn.}
|
{.pragma: myOwn.}
|
||||||
|
|
||||||
proc foo() {.nosideeffect, myown, inLine.} = debugEcho "hi"
|
proc foo() {.nosideeffect, myown, inLine.} = debugEcho "hi"
|
||||||
|
|
@ -28,3 +28,13 @@ var someVar: Foo_bar = "a"
|
||||||
|
|
||||||
echo someVAR
|
echo someVAR
|
||||||
|
|
||||||
|
proc main =
|
||||||
|
var i_fool = 34
|
||||||
|
echo i_fool
|
||||||
|
|
||||||
|
main()
|
||||||
|
|
||||||
|
type
|
||||||
|
Foo = object
|
||||||
|
meh_field: int
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue