C#: Address review comments.

This commit is contained in:
Michael Nebel
2025-04-04 11:47:46 +02:00
parent dd1fbd28be
commit 70a174ad5a

View File

@@ -157,7 +157,7 @@ public class OutParam
public void Test() public void Test()
{ {
int x; int x;
Fn(out x); // Missing Alert Fn(out x); // $ MISSING: Alert
Fn(out _); // GOOD Fn(out _); // GOOD
} }
@@ -194,7 +194,7 @@ public class Captured
void M2() void M2()
{ {
var x = M6(); // Missing Alert var x = M6(); // $ MISSING: Alert
Action a = () => Action a = () =>
{ {
x = 1; // GOOD x = 1; // GOOD
@@ -208,7 +208,7 @@ public class Captured
int x; int x;
Action a = () => Action a = () =>
{ {
x = 1; // Missing Alert x = 1; // $ MISSING: Alert
}; };
a(); a();
} }
@@ -230,7 +230,7 @@ public class Captured
void M5() void M5()
{ {
int x = 0; // Missing Alert. int x = 0; // $ MISSING: Alert
Action a = () => Action a = () =>
{ {
x = 1; // GOOD x = 1; // GOOD
@@ -250,7 +250,7 @@ public class Captured
int captured = 0; // GOOD: Variable captured variable int captured = 0; // GOOD: Variable captured variable
fn(() => { return captured; }); fn(() => { return captured; });
return captured = 1; // Missing Alert. return captured = 1; // $ MISSING: Alert
} }
void M7() void M7()