You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
20
mcs/tests/test-null-operator-23.cs
Normal file
20
mcs/tests/test-null-operator-23.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
public class X
|
||||
{
|
||||
string field;
|
||||
|
||||
public static int Main ()
|
||||
{
|
||||
X x = null;
|
||||
|
||||
try {
|
||||
var res = (x?.field).ToString()?.Length;
|
||||
return 1;
|
||||
} catch (NullReferenceException) {
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user