You've already forked linux-packaging-mono
Imported Upstream version 4.2.1.36
Former-commit-id: fb75898888a02f4d3a74cf0a5b841681bc4c7fa8
This commit is contained in:
committed by
Jo Shields
parent
9668de7cb8
commit
dd547c45d4
33
mcs/tests/test-null-operator-16.cs
Normal file
33
mcs/tests/test-null-operator-16.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
class X
|
||||
{
|
||||
Action<string> a;
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
string x = null;
|
||||
string y = null;
|
||||
string[] z = null;
|
||||
|
||||
x?.Contains (y?.ToLowerInvariant ());
|
||||
x?.Contains (y?.Length.ToString ());
|
||||
|
||||
var res = x?[y?.Length ?? 0];
|
||||
|
||||
var res2 = z?[x?.Length ?? 0];
|
||||
|
||||
x?.Foo (y?.ToLowerInvariant ());
|
||||
|
||||
X xx = null;
|
||||
xx?.a (y?.ToLowerInvariant ());
|
||||
}
|
||||
}
|
||||
|
||||
static class E
|
||||
{
|
||||
public static string Foo (this string arg, string value)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user