-
Notifications
You must be signed in to change notification settings - Fork 646
More fixes to type checking #801
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
Conversation
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.
Copilot reviewed 138 out of 147 changed files in this pull request and generated no comments.
Files not reviewed (9)
- testdata/baselines/reference/submodule/compiler/expressionWithJSDocTypeArguments.errors.txt.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/expressionWithJSDocTypeArguments.js.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/expressionWithJSDocTypeArguments.types: Language not supported
- testdata/baselines/reference/submodule/compiler/expressionWithJSDocTypeArguments.types.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/jsxImportSourceNonPragmaComment.errors.txt.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/jsxIntrinsicElementsTypeArgumentErrors.errors.txt.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/jsxNamespacePrefixInName.symbols: Language not supported
- testdata/baselines/reference/submodule/compiler/jsxNamespacePrefixInName.symbols.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/jsxNamespacePrefixInNameReact.symbols: Language not supported
Comments suppressed due to low confidence (3)
internal/scanner/scanner.go:1014
- The removal of the error reporting call for unterminated regex literals might result in silent failures. Consider either reintroducing the error logging or providing an alternative mechanism to ensure that unterminated regular expressions are appropriately reported.
s.error(diagnostics.Unterminated_regular_expression_literal)
internal/binder/binder.go:327
- [nitpick] Ensure that the updated condition handling JSX namespaced names covers all edge cases. Consider adding unit tests to validate behavior for namespaced JSX identifiers.
if ast.IsPropertyNameLiteral(name) || ast.IsJsxNamespacedName(name) {
internal/checker/checker.go:6627
- [nitpick] Double-check that excluding type parameter declarations from unused local diagnostics does not inadvertently hide genuine unused variables. Verify that this change aligns with the overall intended behavior of the diagnostic checks.
if !ast.IsTypeParameterDeclaration(declaration) && !ast.IsAmbientModule(declaration) {
@@ -1266,23 +1265,3 @@ func (c *Checker) getJsxNamespaceContainerForImplicitImport(location *ast.Node) | |||
func (c *Checker) getJSXRuntimeImportSpecifier(file *ast.SourceFile) (moduleReference string, specifier *ast.Node) { | |||
return c.program.GetJSXRuntimeImportSpecifier(file.Path()) | |||
} | |||
|
|||
func getPragmaFromSourceFile(file *ast.SourceFile, name string) *ast.Pragma { |
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.
Shoot, I must have forgotten to delete this.
@@ -43,79 +17,27 @@ expressionWithJSDocTypeArguments.ts(27,39): error TS1109: Expression expected. | |||
~ | |||
!!! error TS1110: Type expected. | |||
const HuhFoo = foo<string?>; |
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.
I thought this was an intentional difference? https://github.com/microsoft/typescript-go/blob/main/CHANGES.md#parser:~:text=No%20postfix%20T%3F%20and%20T!%20types. notes that as a removed thing.
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.
Hadn't noticed that we were going to outlaw the postfix forms. Let's discuss and if we still feel that way we can back it out. Or we could continue to parse them (for better error recovery) and then always issue a grammar error.
->a:attr : Symbol(a:attr, Decl(jsxNamespacePrefixInName.tsx, 18, 22)) | ||
+>a:attr : Symbol("�missing", Decl(jsxNamespacePrefixInName.tsx, 18, 22)) | ||
+>a:attr : Symbol("a:attr", Decl(jsxNamespacePrefixInName.tsx, 18, 22)) |
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.
Interesting, I wonder where the symbol printing differs for this now, since it's just quoting left.
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.
It comes from this commit.
No description provided.