From fb6c8055683051283f6e094b4f3c2eea8c120207 Mon Sep 17 00:00:00 2001 From: metagn Date: Thu, 14 Mar 2024 13:23:09 +0300 Subject: 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. --- tests/modules/tmodulesymtype.nim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/modules') diff --git a/tests/modules/tmodulesymtype.nim b/tests/modules/tmodulesymtype.nim index b1378ab69..d17c4cca4 100644 --- a/tests/modules/tmodulesymtype.nim +++ b/tests/modules/tmodulesymtype.nim @@ -13,3 +13,10 @@ proc foo() = sequtils foo() + +# issue #23399 +when isMainModule: + sequtils #[tt.Error + ^ expression has no type: sequtils]# + +discard -- cgit 1.4.1-2-gfad0