mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 15:31:28 +00:00
Adds idetools test to check declaration proc signatures.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -168,6 +168,7 @@ examples/cross_calculator/android/tags
|
||||
/testresults.html
|
||||
/testresults.json
|
||||
/tests/caas/SymbolProcRun.*/
|
||||
/tests/caas/forward_declarations
|
||||
/tests/caas/idetools_api
|
||||
/tests/caas/imported
|
||||
/tests/caas/issue_416_template_shift
|
||||
|
||||
15
tests/caas/forward_declarations.nim
Normal file
15
tests/caas/forward_declarations.nim
Normal file
@@ -0,0 +1,15 @@
|
||||
# This example shows that idetools returns an empty signature for a forward
|
||||
# declared proc in proc/symproc runs, but correctly returns the full signature
|
||||
# in caas mode.
|
||||
|
||||
proc echoHello(text: string)
|
||||
|
||||
proc testForward() =
|
||||
echo "T"
|
||||
echoHello("T")
|
||||
|
||||
proc echoHello(text: string) =
|
||||
echo "Hello Mr." & text
|
||||
|
||||
when isMainModule:
|
||||
testForward()
|
||||
9
tests/caas/forward_declarations.txt
Normal file
9
tests/caas/forward_declarations.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
forward_declarations.nim
|
||||
|
||||
> idetools --track:$TESTNIM,9,5 --def $SILENT
|
||||
skProc
|
||||
proc \(string\)
|
||||
|
||||
> idetools --track:$TESTNIM,5,9 --def $SILENT
|
||||
skProc
|
||||
proc \(string\)
|
||||
Reference in New Issue
Block a user