-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix stylecheck error with asyncdispatch (#19350)
* 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 (cherry picked from commit 92e5573)
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
discard """ | ||
matrix: "--styleCheck:error --styleCheck:usages" | ||
""" | ||
|
||
import asyncdispatch | ||
|
||
type | ||
Name = object | ||
id: int | ||
|
||
template hello = | ||
var iD = "string" | ||
var name: Name | ||
doAssert name.id == 0 | ||
doAssert iD == "string" | ||
|
||
hello() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
discard """ | ||
action: reject | ||
nimout: '''treject.nim(14, 13) Error: 'iD' should be: 'id' [field declared in treject.nim(9, 5)]''' | ||
matrix: "--styleCheck:error --styleCheck:usages" | ||
""" | ||
|
||
type | ||
Name = object | ||
id: int | ||
|
||
template hello = | ||
var iD = "string" | ||
var name: Name | ||
echo name.iD | ||
echo iD | ||
|
||
hello() |