diff --git a/conformance/results/mypy/aliases_type_statement.toml b/conformance/results/mypy/aliases_type_statement.toml index d33d02759..b69d735a7 100644 --- a/conformance/results/mypy/aliases_type_statement.toml +++ b/conformance/results/mypy/aliases_type_statement.toml @@ -1,7 +1,4 @@ -conformant = "Partial" -notes = """ -Does not reject type alias defined in function scope. -""" +conformant = "Pass" output = """ aliases_type_statement.py:17: error: "TypeAliasType" has no attribute "bit_count" [attr-defined] aliases_type_statement.py:19: error: "TypeAliasType" not callable [operator] @@ -24,18 +21,16 @@ aliases_type_statement.py:46: error: Invalid type: try using Literal[True] inste aliases_type_statement.py:47: error: Invalid type: try using Literal[1] instead? [valid-type] aliases_type_statement.py:48: error: Invalid type alias: expression is not a valid type [valid-type] aliases_type_statement.py:49: error: Invalid type alias: expression is not a valid type [valid-type] -aliases_type_statement.py:52: error: Name "BadTypeAlias14" already defined on line 51 [no-redef] -aliases_type_statement.py:62: error: All type parameters should be declared ("V" not declared) [valid-type] -aliases_type_statement.py:67: error: All type parameters should be declared ("T1" not declared) [valid-type] -aliases_type_statement.py:77: error: Type argument "str" of "RecursiveTypeAlias2" must be a subtype of "int" [type-var] -aliases_type_statement.py:79: error: Type argument "int" of "RecursiveTypeAlias2" must be a subtype of "str" [type-var] -aliases_type_statement.py:82: error: Cannot resolve name "RecursiveTypeAlias3" (possible cyclic definition) [misc] -aliases_type_statement.py:84: error: Invalid recursive alias: a union item of itself [misc] -aliases_type_statement.py:88: error: Cannot resolve name "RecursiveTypeAlias6" (possible cyclic definition) [misc] -aliases_type_statement.py:88: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc] -aliases_type_statement.py:89: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc] +aliases_type_statement.py:53: error: All type parameters should be declared ("V" not declared) [valid-type] +aliases_type_statement.py:58: error: All type parameters should be declared ("T1" not declared) [valid-type] +aliases_type_statement.py:68: error: Type argument "str" of "RecursiveTypeAlias2" must be a subtype of "int" [type-var] +aliases_type_statement.py:70: error: Type argument "int" of "RecursiveTypeAlias2" must be a subtype of "str" [type-var] +aliases_type_statement.py:73: error: Cannot resolve name "RecursiveTypeAlias3" (possible cyclic definition) [misc] +aliases_type_statement.py:75: error: Invalid recursive alias: a union item of itself [misc] +aliases_type_statement.py:79: error: Cannot resolve name "RecursiveTypeAlias6" (possible cyclic definition) [misc] +aliases_type_statement.py:79: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc] +aliases_type_statement.py:80: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 56: Expected 1 errors """ diff --git a/conformance/results/pyrefly/aliases_type_statement.toml b/conformance/results/pyrefly/aliases_type_statement.toml index 01603ba9d..2feb71761 100644 --- a/conformance/results/pyrefly/aliases_type_statement.toml +++ b/conformance/results/pyrefly/aliases_type_statement.toml @@ -23,14 +23,12 @@ ERROR aliases_type_statement.py:46:23-27: Bool literal cannot be used in annotat ERROR aliases_type_statement.py:47:23-24: Number literal cannot be used in annotations [invalid-annotation] ERROR aliases_type_statement.py:48:23-34: Boolean operation cannot be used in annotations [invalid-annotation] ERROR aliases_type_statement.py:49:23-33: F-string cannot be used in annotations [invalid-annotation] -ERROR aliases_type_statement.py:52:6-20: Cannot redefine existing type alias `BadTypeAlias14` [redefinition] -ERROR aliases_type_statement.py:56:5-30: `type` statement is not allowed in this context [invalid-syntax] -ERROR aliases_type_statement.py:62:15-25: Type parameters used in `TA1` but not declared [invalid-type-var] -ERROR aliases_type_statement.py:67:12-20: Type parameters used in `TA2` but not declared [invalid-type-var] -ERROR aliases_type_statement.py:77:7-41: `str` is not assignable to upper bound `int` of type variable `S` [bad-specialization] -ERROR aliases_type_statement.py:79:7-41: `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization] -ERROR aliases_type_statement.py:82:28-47: Found cyclic self-reference in `RecursiveTypeAlias3` [invalid-type-alias] -ERROR aliases_type_statement.py:84:31-59: Found cyclic self-reference in `RecursiveTypeAlias4` [invalid-type-alias] -ERROR aliases_type_statement.py:88:28-47: Found cyclic self-reference in `RecursiveTypeAlias6` [invalid-type-alias] -ERROR aliases_type_statement.py:89:28-47: Found cyclic self-reference in `RecursiveTypeAlias7` [invalid-type-alias] +ERROR aliases_type_statement.py:53:15-25: Type parameters used in `TA1` but not declared [invalid-type-var] +ERROR aliases_type_statement.py:58:12-20: Type parameters used in `TA2` but not declared [invalid-type-var] +ERROR aliases_type_statement.py:68:7-41: `str` is not assignable to upper bound `int` of type variable `S` [bad-specialization] +ERROR aliases_type_statement.py:70:7-41: `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization] +ERROR aliases_type_statement.py:73:28-47: Found cyclic self-reference in `RecursiveTypeAlias3` [invalid-type-alias] +ERROR aliases_type_statement.py:75:31-59: Found cyclic self-reference in `RecursiveTypeAlias4` [invalid-type-alias] +ERROR aliases_type_statement.py:79:28-47: Found cyclic self-reference in `RecursiveTypeAlias6` [invalid-type-alias] +ERROR aliases_type_statement.py:80:28-47: Found cyclic self-reference in `RecursiveTypeAlias7` [invalid-type-alias] """ diff --git a/conformance/results/pyright/aliases_type_statement.toml b/conformance/results/pyright/aliases_type_statement.toml index 34269c479..407dbd082 100644 --- a/conformance/results/pyright/aliases_type_statement.toml +++ b/conformance/results/pyright/aliases_type_statement.toml @@ -36,19 +36,17 @@ aliases_type_statement.py:46:23 - error: Expected class but received "Literal[Tr aliases_type_statement.py:47:23 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues) aliases_type_statement.py:48:23 - error: Binary operator not allowed in type expression (reportInvalidTypeForm) aliases_type_statement.py:49:23 - error: Type expressions cannot use format string literals (f-strings) (reportGeneralTypeIssues) -aliases_type_statement.py:51:6 - error: Type alias declaration "BadTypeAlias14" is obscured by a declaration of the same name (reportRedeclaration) -aliases_type_statement.py:56:10 - error: A type statement can be used only within a module or class scope (reportGeneralTypeIssues) -aliases_type_statement.py:62:23 - error: Type parameter "V" is not included in the type parameter list for "TA1" (reportGeneralTypeIssues) -aliases_type_statement.py:67:17 - error: Type parameter "T1" is not included in the type parameter list for "TA2" (reportGeneralTypeIssues) -aliases_type_statement.py:77:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]" +aliases_type_statement.py:53:23 - error: Type parameter "V" is not included in the type parameter list for "TA1" (reportGeneralTypeIssues) +aliases_type_statement.py:58:17 - error: Type parameter "T1" is not included in the type parameter list for "TA2" (reportGeneralTypeIssues) +aliases_type_statement.py:68:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]" Type "str" is not assignable to type "int" "str" is not assignable to "int" (reportInvalidTypeForm) -aliases_type_statement.py:79:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]" +aliases_type_statement.py:70:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]" Type "int" is not assignable to type "str" "int" is not assignable to "str" (reportInvalidTypeForm) -aliases_type_statement.py:82:28 - error: Type alias "RecursiveTypeAlias3" cannot use itself in its definition (reportGeneralTypeIssues) -aliases_type_statement.py:84:31 - error: Type alias "RecursiveTypeAlias4" cannot use itself in its definition (reportGeneralTypeIssues) -aliases_type_statement.py:88:28 - error: Type alias "RecursiveTypeAlias6" cannot use itself in its definition (reportGeneralTypeIssues) +aliases_type_statement.py:73:28 - error: Type alias "RecursiveTypeAlias3" cannot use itself in its definition (reportGeneralTypeIssues) +aliases_type_statement.py:75:31 - error: Type alias "RecursiveTypeAlias4" cannot use itself in its definition (reportGeneralTypeIssues) +aliases_type_statement.py:79:28 - error: Type alias "RecursiveTypeAlias6" cannot use itself in its definition (reportGeneralTypeIssues) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 3ddb751cd..9f6daf178 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -555,11 +555,11 @@
Does not reject type alias defined in function scope.
Does not reject use of the `type` statement inside functions.
Does not reject circular definitions of type aliases.
Does not reject redeclarations of type aliases.
Does not support `type` statements generic over `TypeVarTuple`s.
Does not reject circular definitions of type aliases.
Does not support `type` statements generic over `TypeVarTuple`s.
Incorrectly rejects some recursive type aliases using TypeAliasType.
Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.