-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Make "default" a literal and other tweaks from recent LDM #18213
Changes from all commits
666a273
fe08789
178e5d5
14a504c
61cf9ea
580a972
363a70e
8d5e082
a39beb2
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ public static bool IsLiteralNull(this BoundExpression node) | |
|
||
public static bool IsLiteralDefault(this BoundExpression node) | ||
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. Perhaps 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. The reason I used this seemingly strange name is because it matches |
||
{ | ||
return node.Kind == BoundKind.DefaultLiteral && (object)node.Type == null; | ||
return node.Kind == BoundKind.DefaultExpression && node.Syntax.Kind() == SyntaxKind.DefaultLiteralExpression; | ||
} | ||
|
||
// returns true when expression has no side-effects and produces | ||
|
@@ -27,7 +27,7 @@ public static bool IsLiteralDefault(this BoundExpression node) | |
// after some folding/propagation/algebraic transformations. | ||
public static bool IsDefaultValue(this BoundExpression node) | ||
{ | ||
if (node.Kind == BoundKind.DefaultLiteral) | ||
if (node.Kind == BoundKind.DefaultExpression) | ||
{ | ||
return true; | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 would keep this method.