-
Notifications
You must be signed in to change notification settings - Fork 904
Accept diffs that just reduce error elaboration #3183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. --- old.assignmentCompatability45.errors.txt
+++ new.assignmentCompatability45.errors.txt
@@= skipped -0, +0 lines =@@
assignmentCompatability45.ts(7,7): error TS2322: Type 'typeof B' is not assignable to type 'typeof A'.
- Types of construct signatures are incompatible.
- Type 'new (x: number) => B' is not assignable to type 'abstract new () => A'.
- Target signature provides too few arguments. Expected 1 or more, but got 0.
+ Target signature provides too few arguments. Expected 1 or more, but got 0.It is unfortunate that we elide the whole stack, so at no point do we actually say what signature
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's fix this by adding the error message ("Type of construct signatures are incompatible") to the list of ones we don't suppress |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. --- old.constraints0.errors.txt
+++ new.constraints0.errors.txt
@@= skipped -0, +0 lines =@@
-constraints0.ts(14,19): error TS2344: Type 'B' does not satisfy the constraint 'A'.
- Property 'a' is missing in type 'B' but required in type 'A'.
+constraints0.ts(14,19): error TS2741: Property 'a' is missing in type 'B' but required in type 'A'.This is one of those things I think there was disagreement about. I think it's a bummer to lose the word "constraint" here, but...
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's raise this in a meeting and accept for now |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. declare var e: Elephant;
f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal
~
-!!! error TS2345: Argument of type 'Elephant' is not assignable to parameter of type 'Giraffe'.
-!!! error TS2345: Property 'y' is missing in type 'Elephant' but required in type 'Giraffe'.
+!!! error TS2741: Property 'y' is missing in type 'Elephant' but required in type 'Giraffe'.
!!! related TS2728 typeArgumentInferenceWithConstraintAsCommonRoot.ts:2:36: 'y' is declared here.Not mega thrilled we don't clearly identify which type is the arg and which is the parameter...
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's raise this in a meeting and accept for now |
|
jakebailey marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,63 @@ fourslash/inlayHints/inlayHintsInteractiveVariableTypes2.baseline.diff | |
| fourslash/inlayHints/inlayHintsVariableTypes3.baseline.diff | ||
| fourslash/inlayHints/inlayHintsInteractiveFunctionParameterTypes1.baseline.diff | ||
|
|
||
| ## regex checking ## | ||
| ## Skipped error elaboration ## | ||
| compiler/arrayCast.errors.txt.diff | ||
| compiler/assignmentCompatWithOverloads.errors.txt.diff | ||
| compiler/assignmentCompatability44.errors.txt.diff | ||
| compiler/assignmentCompatability45.errors.txt.diff | ||
| compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt.diff | ||
| compiler/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt.diff | ||
| compiler/bigintWithLib.errors.txt.diff | ||
| compiler/classSideInheritance3.errors.txt.diff | ||
| compiler/computedPropertyBindingElementDeclarationNoCrash1.errors.txt.diff | ||
| compiler/constraints0.errors.txt.diff | ||
| compiler/differentTypesWithSameName.errors.txt.diff | ||
| compiler/excessPropertyCheckWithUnions.errors.txt.diff | ||
| compiler/genericConstraint2.errors.txt.diff | ||
| compiler/genericTypeConstraints.errors.txt.diff | ||
| compiler/generics1.errors.txt.diff | ||
| compiler/generics2.errors.txt.diff | ||
| compiler/generics5.errors.txt.diff | ||
| compiler/inferenceFromIncompleteSource.errors.txt.diff | ||
| compiler/mappedTypeAsStringTemplate.errors.txt.diff | ||
| compiler/noParameterReassignmentJSIIFE.errors.txt.diff | ||
| compiler/objectLiteralFunctionArgContextualTyping2.errors.txt.diff | ||
| compiler/objectLiteralThisWidenedOnUse.errors.txt.diff | ||
| compiler/recursiveClassReferenceTest.errors.txt.diff | ||
| compiler/templateStringsArrayTypeDefinedInES5Mode(target=es2015).errors.txt.diff | ||
| compiler/templateStringsArrayTypeNotDefinedES5Mode(target=es2015).errors.txt.diff | ||
| compiler/templateStringsArrayTypeRedefinedInES6Mode.errors.txt.diff | ||
| compiler/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt.diff | ||
| conformance/decoratorOnClassMethod10(target=es2015).errors.txt.diff | ||
| conformance/destructuringParameterDeclaration2.errors.txt.diff | ||
| conformance/destructuringParameterDeclaration5.errors.txt.diff | ||
| conformance/es2020IntlAPIs.errors.txt.diff | ||
| conformance/genericCallWithObjectTypeArgsAndConstraints4.errors.txt.diff | ||
| conformance/genericCallWithObjectTypeArgsAndConstraints5.errors.txt.diff | ||
| conformance/instanceofOperatorWithInvalidOperands.es2015.errors.txt.diff | ||
| conformance/iterableArrayPattern17.errors.txt.diff | ||
|
Comment on lines
+94
to
+96
|
||
| conformance/iterableArrayPattern18.errors.txt.diff | ||
| conformance/iterableArrayPattern19.errors.txt.diff | ||
| conformance/mappedTypeConstraints2.errors.txt.diff | ||
| conformance/narrowingGenericTypeFromInstanceof01.errors.txt.diff | ||
| conformance/noInfer.errors.txt.diff | ||
| conformance/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt.diff | ||
| conformance/subtypingWithNumericIndexer2.errors.txt.diff | ||
| conformance/subtypingWithNumericIndexer3.errors.txt.diff | ||
| conformance/subtypingWithNumericIndexer4.errors.txt.diff | ||
| conformance/subtypingWithNumericIndexer5.errors.txt.diff | ||
| conformance/subtypingWithStringIndexer2.errors.txt.diff | ||
| conformance/subtypingWithStringIndexer3.errors.txt.diff | ||
| conformance/subtypingWithStringIndexer4.errors.txt.diff | ||
| conformance/thisTypeInFunctionsNegative.errors.txt.diff | ||
| conformance/typeSatisfaction.errors.txt.diff | ||
| conformance/typeSatisfactionWithDefaultExport.errors.txt.diff | ||
| conformance/typeSatisfaction_errorLocations1.errors.txt.diff | ||
| conformance/typedefMultipleTypeParameters.errors.txt.diff | ||
| conformance/unionTypeCallSignatures6.errors.txt.diff | ||
| conformance/usingDeclarations.14.errors.txt.diff | ||
| conformance/usingDeclarationsWithIteratorObject.errors.txt.diff | ||
|
|
||
| ## find all references ## | ||
| fourslash/findAllReferences/isDefinitionAcrossGlobalProjects.baseline.jsonc.diff | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is:
It does seems like that top error provides more guidance, and with the new stack, we probably never generate it anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix this by adding the error message to the list of ones we don't suppress