Skip to content

Commit

Permalink
Test more
Browse files Browse the repository at this point in the history
  • Loading branch information
JukkaL committed Jun 18, 2024
1 parent 5e42cd9 commit 0f939da
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test-data/unit/pythoneval.test
Original file line number Diff line number Diff line change
Expand Up @@ -2120,7 +2120,7 @@ _testPEP695VarianceInference.py:17: error: Incompatible types in assignment (exp

[case testPEP695TypeAliasWithDifferentTargetTypes]
# flags: --python-version=3.12 --enable-incomplete-feature=NewGenericSyntax
from typing import Any, Callable, List, Literal, TypedDict, overload
from typing import Any, Callable, List, Literal, TypedDict, overload, TypeAlias, TypeVar

class C[T]: pass

Expand All @@ -2135,6 +2135,10 @@ class O[T]:
class TD(TypedDict):
x: int

S = TypeVar("S")
A = list[S]
B: TypeAlias = list[S]

type A1 = type[int]
type A2 = type[int] | None
type A3 = None | type[int]
Expand Down Expand Up @@ -2183,3 +2187,8 @@ type J3[*Ts] = tuple[*Ts]
type J4[T] = J1[T] | None
type J5[T] = None | J1[T]
type J6[*Ts] = J3[*Ts] | None

type K1 = A[int] | None
type K2 = None | A[int]
type K3 = B[int] | None
type K4 = None | B[int]

0 comments on commit 0f939da

Please sign in to comment.