-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix stylecheck bug with nre #19356
fix stylecheck bug with nre #19356
Conversation
typeinfo.nim: importCompilerProc => importcompilerproc nre.nim: newLineFlags => newlineFlags system.nim: JSRoot => JsRoot ref nim-lang#19319
it is a partial regression since nim-lang#12842
proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
markUsed(c, n[1].info, s) # <---------- dotexpr is already checked here
result = semSym(c, n, s, flags) # we shouldn't let semSym check dotexpr again
onUse(n[1].info, s)
return |
find another same bug serve.nim const Serve* = 12 test.nim import serve
echo serve.Serve
|
Ready for review |
Can we get a backport? been hitting this too. |
If you would like a commit to be backported (and it should), you can @narimiran in case that the message is ignored. Nowadays it seems that contributing to 1-6 branch directly is acceptable => #19697 |
If somebody (accidentally) does it, it doesn't mean it is acceptable/preferred. I would much rather have PRs targeted at |
* stylecheck usages part two: stdlib cleanup typeinfo.nim: importCompilerProc => importcompilerproc nre.nim: newLineFlags => newlineFlags system.nim: JSRoot => JsRoot ref #19319 * prefer importCompilerProc * fix stylecheck error with asyncdispatch it is a partial regression since #12842 * add tests * don't use echo in tests * fix stylecheck bug with nre * Update compiler/linter.nim * no need to check dotexpr again * neither did let/var/const (cherry picked from commit 00775f6)
Before
nim r --stylecheck:error --eval:"import nre"