|
|
|
@ -134,6 +134,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
@@ -134,6 +134,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
|
|
|
|
|
NoDeconstruction_NotUsingConver_Tuple(); |
|
|
|
|
NullReferenceException_Field_Deconstruction(out _); |
|
|
|
|
NullReferenceException_RefLocalReferencesField_Deconstruction(out _); |
|
|
|
|
NullReferenceException_RefLocalReferencesArrayElement_Deconstruction(out _, null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void Property_NoDeconstruction_SwappedAssignments() |
|
|
|
@ -211,5 +212,16 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
@@ -211,5 +212,16 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
|
|
|
|
|
Console.WriteLine(ex.GetType().FullName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void NullReferenceException_RefLocalReferencesArrayElement_Deconstruction(out int a, int[] arr) |
|
|
|
|
{ |
|
|
|
|
try { |
|
|
|
|
ref int i = ref arr[0]; |
|
|
|
|
(i, a) = GetSource<int, int>(); |
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
a = 0; |
|
|
|
|
Console.WriteLine(ex.GetType().FullName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|