-
Notifications
You must be signed in to change notification settings - Fork 779
feat: move nil check to call sites #658
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 6 commits
2a615d2
65eca1e
89c8a5b
6355e48
fd4cf87
77cb9b8
2dc87d8
8723013
d9286ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -295,7 +295,7 @@ func (c *Checker) checkGrammarModifiers(node *ast.Node /*Union[HasModifiers, Has | |||||
| parent := node.Parent | ||||||
|
|
||||||
| if node.Kind == ast.KindTypeParameter { | ||||||
| if !(ast.IsFunctionLikeDeclaration(parent) || ast.IsClassLike(parent) || | ||||||
| if !((parent != nil && ast.IsFunctionLikeDeclaration(parent)) || ast.IsClassLike(parent) || | ||||||
|
||||||
| ast.IsFunctionTypeNode(parent) || ast.IsConstructorTypeNode(parent) || | ||||||
| ast.IsCallSignatureDeclaration(parent) || ast.IsConstructSignatureDeclaration(parent) || | ||||||
| ast.IsMethodSignatureDeclaration(parent)) { | ||||||
|
|
@@ -2069,7 +2069,7 @@ func (c *Checker) checkGrammarStatementInAmbientContext(node *ast.Node) bool { | |||||
| if node.Flags&ast.NodeFlagsAmbient != 0 { | ||||||
| // Find containing block which is either Block, ModuleBlock, SourceFile | ||||||
| links := c.nodeLinks.Get(node) | ||||||
| if !links.hasReportedStatementInAmbientContext && (ast.IsFunctionLike(node.Parent) || ast.IsAccessor(node.Parent)) { | ||||||
| if !links.hasReportedStatementInAmbientContext && (node.Parent != nil && ast.IsFunctionLike(node.Parent) || ast.IsAccessor(node.Parent)) { | ||||||
|
||||||
| if !links.hasReportedStatementInAmbientContext && (node.Parent != nil && ast.IsFunctionLike(node.Parent) || ast.IsAccessor(node.Parent)) { | |
| if !links.hasReportedStatementInAmbientContext && node.Parent != nil && (ast.IsFunctionLike(node.Parent) || ast.IsAccessor(node.Parent)) { |
Uh oh!
There was an error while loading. Please reload this page.