forked from nim-lang/Nim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ignore modules when looking up symbol with expected type
fixes nim-lang#23596
- Loading branch information
Showing
3 changed files
with
20 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,13 @@ | ||
# issue #23596 | ||
|
||
import std/heapqueue | ||
type Algo = enum heapqueue, quick | ||
when false: | ||
let x = heapqueue | ||
let y: Algo = heapqueue | ||
proc bar*(algo=quick) = | ||
var x: HeapQueue[int] | ||
case algo | ||
of heapqueue: echo 1 # `Algo.heapqueue` works on devel | ||
of quick: echo 2 | ||
echo x.len |
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,6 @@ | ||
import std/heapqueue | ||
proc heapqueue(x: int) = discard | ||
let x: proc (x: int) = heapqueue | ||
let y: proc = heapqueue | ||
when false: | ||
let z = heapqueue |