-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Handle empty string parameter value in MetadataLoadContext #61457
Conversation
Tagging subscribers to this area: @buyaa-n Issue DetailsFixes #57238. Also add test for
|
@@ -198,6 +198,8 @@ public class ParametersWithDefaultValues | |||
public void Foo4(short s = -34) { } | |||
public void Foo5(decimal d = 1234m) { } | |||
public void Foo6([DateTimeConstant(ticks: 8736726782)] DateTime dt) { } | |||
public void Foo7(string s1 = "foo", string s2 = "") { } |
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.
NIT: maybe add a test case for null default?
public void Foo7(string s1 = "foo", string s2 = "") { } | |
public void Foo7(string s1 = "foo", string s2 = "", string s3 = null) { } |
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.
Sure, done.
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.
Left and NIT, overall LGTM, thanks!
Fixes #57238.
Also add test for
null
parameter default value, since that is another special case.