We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee70928 commit b0089dbCopy full SHA for b0089db
1 file changed
pyrefly/lib/test/named_tuple.rs
@@ -347,3 +347,17 @@ class B(A):
347
return super().__init__(x, y)
348
"#,
349
);
350
+
351
+testcase!(
352
+ bug = "The asserted type is wrong",
353
+ test_custom_iter,
354
+ r#"
355
+from typing import assert_type, Iterator, NamedTuple
356
+class NT(NamedTuple):
357
+ x: int
358
+ def __iter__(self) -> Iterator[str]: ...
359
+nt = NT(0)
360
+for x in nt:
361
+ assert_type(x, str) # E: assert_type(int, str)
362
+ "#,
363
+);
0 commit comments