diff --git a/conformance/results/mypy/generics_paramspec_variance.toml b/conformance/results/mypy/generics_paramspec_variance.toml new file mode 100644 index 000000000..78a4e2880 --- /dev/null +++ b/conformance/results/mypy/generics_paramspec_variance.toml @@ -0,0 +1,22 @@ +conformant = "Unsupported" +conformance_automated = "Fail" +errors_diff = """ +Line 24: Expected 1 errors +Line 31: Expected 1 errors +Line 47: Expected 1 errors +Line 23: Unexpected errors ['generics_paramspec_variance.py:23: error: Incompatible types in assignment (expression has type "CovariantParamSpec[[int]]", variable has type "CovariantParamSpec[[object]]") [assignment]'] +Line 26: Unexpected errors ['generics_paramspec_variance.py:26: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]'] +Line 30: Unexpected errors ['generics_paramspec_variance.py:30: error: Missing return statement [empty-body]'] +Line 37: Unexpected errors ['generics_paramspec_variance.py:37: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]'] +Line 46: Unexpected errors ['generics_paramspec_variance.py:46: error: Incompatible types in assignment (expression has type "CovariantParamSpecOld[[int]]", variable has type "CovariantParamSpecOld[[object]]") [assignment]'] +""" +output = """ +generics_paramspec_variance.py:15: error: Incompatible types in assignment (expression has type "ContravariantParamSpec[[int]]", variable has type "ContravariantParamSpec[[object]]") [assignment] +generics_paramspec_variance.py:23: error: Incompatible types in assignment (expression has type "CovariantParamSpec[[int]]", variable has type "CovariantParamSpec[[object]]") [assignment] +generics_paramspec_variance.py:26: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc] +generics_paramspec_variance.py:30: error: Missing return statement [empty-body] +generics_paramspec_variance.py:35: error: Incompatible types in assignment (expression has type "ContravariantParamSpecOld[[int]]", variable has type "ContravariantParamSpecOld[[object]]") [assignment] +generics_paramspec_variance.py:37: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc] +generics_paramspec_variance.py:41: error: Missing return statement [empty-body] +generics_paramspec_variance.py:46: error: Incompatible types in assignment (expression has type "CovariantParamSpecOld[[int]]", variable has type "CovariantParamSpecOld[[object]]") [assignment] +""" diff --git a/conformance/results/mypy/generics_typevartuple_variance.toml b/conformance/results/mypy/generics_typevartuple_variance.toml new file mode 100644 index 000000000..545bf7abc --- /dev/null +++ b/conformance/results/mypy/generics_typevartuple_variance.toml @@ -0,0 +1,22 @@ +conformant = "Unsupported" +conformance_automated = "Fail" +errors_diff = """ +Line 24: Expected 1 errors +Line 35: Expected 1 errors +Line 41: Expected 1 errors +Line 23: Unexpected errors ['generics_typevartuple_variance.py:23: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[[int]]", variable has type "CovariantTypeVarTuple[[object]]") [assignment]'] +Line 26: Unexpected errors ['generics_typevartuple_variance.py:26: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc]'] +Line 34: Unexpected errors ['generics_typevartuple_variance.py:34: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment]'] +Line 37: Unexpected errors ['generics_typevartuple_variance.py:37: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]'] +Line 42: Unexpected errors ['generics_typevartuple_variance.py:42: error: Missing return statement [empty-body]'] +""" +output = """ +generics_typevartuple_variance.py:15: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[[int]]", variable has type "ContravariantTypeVarTuple[[object]]") [assignment] +generics_typevartuple_variance.py:23: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[[int]]", variable has type "CovariantTypeVarTuple[[object]]") [assignment] +generics_typevartuple_variance.py:26: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc] +generics_typevartuple_variance.py:31: error: Missing return statement [empty-body] +generics_typevartuple_variance.py:34: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment] +generics_typevartuple_variance.py:37: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc] +generics_typevartuple_variance.py:42: error: Missing return statement [empty-body] +generics_typevartuple_variance.py:47: error: Incompatible types in assignment (expression has type "CovariantTypeVarTupleOld[object]", variable has type "CovariantTypeVarTupleOld[int]") [assignment] +""" diff --git a/conformance/results/pyrefly/generics_paramspec_variance.toml b/conformance/results/pyrefly/generics_paramspec_variance.toml new file mode 100644 index 000000000..8fe747eae --- /dev/null +++ b/conformance/results/pyrefly/generics_paramspec_variance.toml @@ -0,0 +1,24 @@ +conformant = "Unsupported" +conformance_automated = "Fail" +errors_diff = """ +Line 15: Expected 1 errors +Line 24: Expected 1 errors +Line 31: Expected 1 errors +Line 41: Expected 1 errors +Line 14: Unexpected errors ['`ContravariantParamSpec[[object]]` is not assignable to `ContravariantParamSpec[[int]]` [bad-assignment]'] +Line 23: Unexpected errors ['`CovariantParamSpec[[int]]` is not assignable to `CovariantParamSpec[[object]]` [bad-assignment]'] +Line 26: Unexpected errors ['Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]'] +Line 34: Unexpected errors ['`ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment]'] +Line 37: Unexpected errors ['Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]'] +Line 46: Unexpected errors ['`CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment]'] +""" +output = """ +ERROR generics_paramspec_variance.py:14:39-45: `ContravariantParamSpec[[object]]` is not assignable to `ContravariantParamSpec[[int]]` [bad-assignment] +ERROR generics_paramspec_variance.py:23:39-46: `CovariantParamSpec[[int]]` is not assignable to `CovariantParamSpec[[object]]` [bad-assignment] +ERROR generics_paramspec_variance.py:26:24-42: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec] +ERROR generics_paramspec_variance.py:34:46-56: `ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment] +ERROR generics_paramspec_variance.py:35:14-24: `ContravariantParamSpecOld[[int]]` is not assignable to variable `in_obj_old` with type `ContravariantParamSpecOld[[object]]` [bad-assignment] +ERROR generics_paramspec_variance.py:37:26-40: Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec] +ERROR generics_paramspec_variance.py:46:46-57: `CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment] +ERROR generics_paramspec_variance.py:47:15-26: `CovariantParamSpecOld[[object]]` is not assignable to variable `out_int_old` with type `CovariantParamSpecOld[[int]]` [bad-assignment] +""" diff --git a/conformance/results/pyrefly/generics_typevartuple_variance.toml b/conformance/results/pyrefly/generics_typevartuple_variance.toml new file mode 100644 index 000000000..d491d0b0b --- /dev/null +++ b/conformance/results/pyrefly/generics_typevartuple_variance.toml @@ -0,0 +1,24 @@ +conformant = "Unsupported" +conformance_automated = "Fail" +errors_diff = """ +Line 15: Expected 1 errors +Line 24: Expected 1 errors +Line 31: Expected 1 errors +Line 41: Expected 1 errors +Line 14: Unexpected errors ['`ContravariantTypeVarTuple[[object]]` is not assignable to `ContravariantTypeVarTuple[[int]]` [bad-assignment]'] +Line 23: Unexpected errors ['`CovariantTypeVarTuple[[int]]` is not assignable to `CovariantTypeVarTuple[[object]]` [bad-assignment]'] +Line 26: Unexpected errors ['Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]'] +Line 34: Unexpected errors ['`ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]'] +Line 37: Unexpected errors ['Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]'] +Line 46: Unexpected errors ['`CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]'] +""" +output = """ +ERROR generics_typevartuple_variance.py:14:42-48: `ContravariantTypeVarTuple[[object]]` is not assignable to `ContravariantTypeVarTuple[[int]]` [bad-assignment] +ERROR generics_typevartuple_variance.py:23:42-49: `CovariantTypeVarTuple[[int]]` is not assignable to `CovariantTypeVarTuple[[object]]` [bad-assignment] +ERROR generics_typevartuple_variance.py:26:29-47: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple] +ERROR generics_typevartuple_variance.py:34:49-59: `ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment] +ERROR generics_typevartuple_variance.py:35:14-24: `ContravariantTypeVarTupleOld[int]` is not assignable to variable `in_obj_old` with type `ContravariantTypeVarTupleOld[object]` [bad-assignment] +ERROR generics_typevartuple_variance.py:37:31-45: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple] +ERROR generics_typevartuple_variance.py:46:49-60: `CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment] +ERROR generics_typevartuple_variance.py:47:15-26: `CovariantTypeVarTupleOld[object]` is not assignable to variable `out_int_old` with type `CovariantTypeVarTupleOld[int]` [bad-assignment] +""" diff --git a/conformance/results/pyright/generics_paramspec_variance.toml b/conformance/results/pyright/generics_paramspec_variance.toml new file mode 100644 index 000000000..b2abd1ce9 --- /dev/null +++ b/conformance/results/pyright/generics_paramspec_variance.toml @@ -0,0 +1,40 @@ +conformant = "Unsupported" +conformance_automated = "Fail" +errors_diff = """ +Line 31: Expected 1 errors +Line 41: Expected 1 errors +Line 14: Unexpected errors ['generics_paramspec_variance.py:14:39 - error: Type "ContravariantParamSpec[(object)]" is not assignable to declared type "ContravariantParamSpec[(int)]"'] +Line 23: Unexpected errors ['generics_paramspec_variance.py:23:39 - error: Type "CovariantParamSpec[(int)]" is not assignable to declared type "CovariantParamSpec[(object)]"'] +Line 26: Unexpected errors ['generics_paramspec_variance.py:26:24 - error: "contravariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)'] +Line 34: Unexpected errors ['generics_paramspec_variance.py:34:46 - error: Type "ContravariantParamSpecOld[(object)]" is not assignable to declared type "ContravariantParamSpecOld[(int)]"'] +Line 37: Unexpected errors ['generics_paramspec_variance.py:37:26 - error: "covariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)'] +Line 46: Unexpected errors ['generics_paramspec_variance.py:46:46 - error: Type "CovariantParamSpecOld[(int)]" is not assignable to declared type "CovariantParamSpecOld[(object)]"'] +""" +output = """ +generics_paramspec_variance.py:14:39 - error: Type "ContravariantParamSpec[(object)]" is not assignable to declared type "ContravariantParamSpec[(int)]" + "ContravariantParamSpec[(object)]" is not assignable to "ContravariantParamSpec[(int)]" + Type parameter "InP@ContravariantParamSpec" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType) +generics_paramspec_variance.py:15:10 - error: Type "ContravariantParamSpec[(int)]" is not assignable to declared type "ContravariantParamSpec[(object)]" + "ContravariantParamSpec[(int)]" is not assignable to "ContravariantParamSpec[(object)]" + Type parameter "InP@ContravariantParamSpec" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType) +generics_paramspec_variance.py:23:39 - error: Type "CovariantParamSpec[(int)]" is not assignable to declared type "CovariantParamSpec[(object)]" + "CovariantParamSpec[(int)]" is not assignable to "CovariantParamSpec[(object)]" + Type parameter "OutP@CovariantParamSpec" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType) +generics_paramspec_variance.py:24:11 - error: Type "CovariantParamSpec[(object)]" is not assignable to declared type "CovariantParamSpec[(int)]" + "CovariantParamSpec[(object)]" is not assignable to "CovariantParamSpec[(int)]" + Type parameter "OutP@CovariantParamSpec" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType) +generics_paramspec_variance.py:26:24 - error: "contravariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues) +generics_paramspec_variance.py:34:46 - error: Type "ContravariantParamSpecOld[(object)]" is not assignable to declared type "ContravariantParamSpecOld[(int)]" + "ContravariantParamSpecOld[(object)]" is not assignable to "ContravariantParamSpecOld[(int)]" + Type parameter "InP@ContravariantParamSpecOld" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType) +generics_paramspec_variance.py:35:14 - error: Type "ContravariantParamSpecOld[(int)]" is not assignable to declared type "ContravariantParamSpecOld[(object)]" + "ContravariantParamSpecOld[(int)]" is not assignable to "ContravariantParamSpecOld[(object)]" + Type parameter "InP@ContravariantParamSpecOld" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType) +generics_paramspec_variance.py:37:26 - error: "covariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues) +generics_paramspec_variance.py:46:46 - error: Type "CovariantParamSpecOld[(int)]" is not assignable to declared type "CovariantParamSpecOld[(object)]" + "CovariantParamSpecOld[(int)]" is not assignable to "CovariantParamSpecOld[(object)]" + Type parameter "OutP@CovariantParamSpecOld" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType) +generics_paramspec_variance.py:47:15 - error: Type "CovariantParamSpecOld[(object)]" is not assignable to declared type "CovariantParamSpecOld[(int)]" + "CovariantParamSpecOld[(object)]" is not assignable to "CovariantParamSpecOld[(int)]" + Type parameter "OutP@CovariantParamSpecOld" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType) +""" diff --git a/conformance/results/pyright/generics_typevartuple_variance.toml b/conformance/results/pyright/generics_typevartuple_variance.toml new file mode 100644 index 000000000..2ae12eb0d --- /dev/null +++ b/conformance/results/pyright/generics_typevartuple_variance.toml @@ -0,0 +1,40 @@ +conformant = "Unsupported" +conformance_automated = "Fail" +errors_diff = """ +Line 31: Expected 1 errors +Line 41: Expected 1 errors +Line 14: Unexpected errors ['generics_typevartuple_variance.py:14:42 - error: Type "ContravariantTypeVarTuple[(object)]" is not assignable to declared type "ContravariantTypeVarTuple[(int)]"'] +Line 23: Unexpected errors ['generics_typevartuple_variance.py:23:42 - error: Type "CovariantTypeVarTuple[(int)]" is not assignable to declared type "CovariantTypeVarTuple[(object)]"'] +Line 26: Unexpected errors ['generics_typevartuple_variance.py:26:29 - error: "contravariant" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues)'] +Line 34: Unexpected errors ['generics_typevartuple_variance.py:34:49 - error: Type "ContravariantTypeVarTupleOld[object]" is not assignable to declared type "ContravariantTypeVarTupleOld[int]"'] +Line 37: Unexpected errors ['generics_typevartuple_variance.py:37:31 - error: "covariant" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues)'] +Line 46: Unexpected errors ['generics_typevartuple_variance.py:46:49 - error: Type "CovariantTypeVarTupleOld[int]" is not assignable to declared type "CovariantTypeVarTupleOld[object]"'] +""" +output = """ +generics_typevartuple_variance.py:14:42 - error: Type "ContravariantTypeVarTuple[(object)]" is not assignable to declared type "ContravariantTypeVarTuple[(int)]" + "ContravariantTypeVarTuple[(object)]" is not assignable to "ContravariantTypeVarTuple[(int)]" + Type parameter "InTs@ContravariantTypeVarTuple" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType) +generics_typevartuple_variance.py:15:10 - error: Type "ContravariantTypeVarTuple[(int)]" is not assignable to declared type "ContravariantTypeVarTuple[(object)]" + "ContravariantTypeVarTuple[(int)]" is not assignable to "ContravariantTypeVarTuple[(object)]" + Type parameter "InTs@ContravariantTypeVarTuple" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType) +generics_typevartuple_variance.py:23:42 - error: Type "CovariantTypeVarTuple[(int)]" is not assignable to declared type "CovariantTypeVarTuple[(object)]" + "CovariantTypeVarTuple[(int)]" is not assignable to "CovariantTypeVarTuple[(object)]" + Type parameter "OutTs@CovariantTypeVarTuple" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType) +generics_typevartuple_variance.py:24:11 - error: Type "CovariantTypeVarTuple[(object)]" is not assignable to declared type "CovariantTypeVarTuple[(int)]" + "CovariantTypeVarTuple[(object)]" is not assignable to "CovariantTypeVarTuple[(int)]" + Type parameter "OutTs@CovariantTypeVarTuple" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType) +generics_typevartuple_variance.py:26:29 - error: "contravariant" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues) +generics_typevartuple_variance.py:34:49 - error: Type "ContravariantTypeVarTupleOld[object]" is not assignable to declared type "ContravariantTypeVarTupleOld[int]" + "ContravariantTypeVarTupleOld[object]" is not assignable to "ContravariantTypeVarTupleOld[int]" + Type parameter "InTs@ContravariantTypeVarTupleOld" is invariant, but "*tuple[object]" is not the same as "*tuple[int]" (reportAssignmentType) +generics_typevartuple_variance.py:35:14 - error: Type "ContravariantTypeVarTupleOld[int]" is not assignable to declared type "ContravariantTypeVarTupleOld[object]" + "ContravariantTypeVarTupleOld[int]" is not assignable to "ContravariantTypeVarTupleOld[object]" + Type parameter "InTs@ContravariantTypeVarTupleOld" is invariant, but "*tuple[int]" is not the same as "*tuple[object]" (reportAssignmentType) +generics_typevartuple_variance.py:37:31 - error: "covariant" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues) +generics_typevartuple_variance.py:46:49 - error: Type "CovariantTypeVarTupleOld[int]" is not assignable to declared type "CovariantTypeVarTupleOld[object]" + "CovariantTypeVarTupleOld[int]" is not assignable to "CovariantTypeVarTupleOld[object]" + Type parameter "OutTs@CovariantTypeVarTupleOld" is invariant, but "*tuple[int]" is not the same as "*tuple[object]" (reportAssignmentType) +generics_typevartuple_variance.py:47:15 - error: Type "CovariantTypeVarTupleOld[object]" is not assignable to declared type "CovariantTypeVarTupleOld[int]" + "CovariantTypeVarTupleOld[object]" is not assignable to "CovariantTypeVarTupleOld[int]" + Type parameter "OutTs@CovariantTypeVarTupleOld" is invariant, but "*tuple[object]" is not the same as "*tuple[int]" (reportAssignmentType) +""" diff --git a/conformance/results/results.html b/conformance/results/results.html index 3ddb751cd..0f8c1c35d 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -335,6 +335,13 @@
Does not reject use of type variable within an upper bound.