Skip to content

Commit 870ca9c

Browse files
author
Vaishnavi KN
committed
Clarify intent of walrus assignment inference test
1 parent 7be65e3 commit 870ca9c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test-data/unit/check-expressions.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2540,6 +2540,10 @@ def last_known_value() -> None:
25402540
[builtins fixtures/primitives.pyi]
25412541

25422542
[case walrus_operator_in_comprehension_infers_type]
2543+
# Ensure that assignment expressions (:=) inside comprehensions
2544+
# correctly infer and propagate the assigned variable's type
2545+
# outside the comprehension scope.
2546+
25432547
from dataclasses import dataclass
25442548

25452549
@dataclass

0 commit comments

Comments
 (0)