@@ -4425,13 +4425,19 @@ class C2[T2: int]: ...
44254425class C3[T3: str | bytes]: ...
44264426class C4[T4: (str, bytes)]: ...
44274427
4428+ class Outer:
4429+ class Inner[T]: ...
4430+
44284431[out]
44294432class C[T]: ...
44304433class C1[T1](int): ...
44314434class C2[T2: int]: ...
44324435class C3[T3: str | bytes]: ...
44334436class C4[T4: (str, bytes)]: ...
44344437
4438+ class Outer:
4439+ class Inner[T]: ...
4440+
44354441[case testPEP695GenericFunction]
44364442# flags: --python-version=3.12
44374443
@@ -4440,12 +4446,18 @@ def f2[T2: int](): ...
44404446def f3[T3: str | bytes](): ...
44414447def f4[T4: (str, bytes)](): ...
44424448
4449+ class C:
4450+ def m[T](self, x: T) -> T: ...
4451+
44434452[out]
44444453def f1[T1]() -> None: ...
44454454def f2[T2: int]() -> None: ...
44464455def f3[T3: str | bytes]() -> None: ...
44474456def f4[T4: (str, bytes)]() -> None: ...
44484457
4458+ class C:
4459+ def m[T](self, x: T) -> T: ...
4460+
44494461[case testPEP695TypeAlias]
44504462# flags: --python-version=3.12
44514463
@@ -4455,12 +4467,17 @@ type Alias2[T2: int] = list[T2] | set[T2]
44554467type Alias3[T3: str | bytes] = list[T3] | set[T3]
44564468type Alias4[T4: (str, bytes)] = list[T4] | set[T4]
44574469
4470+ class C:
4471+ type IndentedAlias[T] = list[T]
4472+
44584473[out]
44594474type Alias = int | str
44604475type Alias1[T1] = list[T1] | set[T1]
44614476type Alias2[T2: int] = list[T2] | set[T2]
44624477type Alias3[T3: str | bytes] = list[T3] | set[T3]
44634478type Alias4[T4: (str, bytes)] = list[T4] | set[T4]
4479+ class C:
4480+ type IndentedAlias[T] = list[T]
44644481
44654482[case testPEP695Syntax_semanal]
44664483# flags: --python-version=3.12
0 commit comments