mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-29 18:53:58 +00:00
propagate efWantStmt in semWhen (#23400)
fixes #23399
The new case introduced in #21657 is triggered by `efWantStmt` but the
`when` statement doesn't normally propagate this flag, so propagate it
when the `semCheck` param in `semWhen` is true which happens when the
`when` statement is `efWhenStmt` anyway.
(cherry picked from commit fb6c805568)
This commit is contained in:
@@ -13,3 +13,10 @@ proc foo() =
|
||||
sequtils
|
||||
|
||||
foo()
|
||||
|
||||
# issue #23399
|
||||
when isMainModule:
|
||||
sequtils #[tt.Error
|
||||
^ expression has no type: sequtils]#
|
||||
|
||||
discard
|
||||
|
||||
Reference in New Issue
Block a user