Skip to content
Draft

Ines #20373

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
modification de semanal.py
  • Loading branch information
ines-bg committed Dec 8, 2025
commit 5998612b756ac370a74d3d0c761bb211e0cd0b2c
12 changes: 12 additions & 0 deletions mypy/nested-class-scope.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from typing import *

x: Optional[int] = None
y: Optional[int] = None

def f() -> None:
x = 1
y = 1
class C:
reveal_type(x) # Incorrectly reveals int, should be Optional[int]
reveal_type(y) # Correctly reveals int
x = 2
Loading