diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
index 8d1dfa60b..8013ab9e6 100644
--- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
+++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
@@ -71,6 +71,8 @@
+
+
diff --git a/ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs b/ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs
index b406cc5cc..2cf64cf18 100644
--- a/ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs
+++ b/ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs
@@ -257,6 +257,12 @@ namespace ICSharpCode.Decompiler.Tests
await Run();
}
+ [Test]
+ public async Task GuessAccessors()
+ {
+ await Run();
+ }
+
async Task Run([CallerMemberName] string testName = null, DecompilerSettings settings = null,
AssemblerOptions assemblerOptions = AssemblerOptions.Library)
{
diff --git a/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/GuessAccessors.cs b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/GuessAccessors.cs
new file mode 100644
index 000000000..37d64c6e5
--- /dev/null
+++ b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/GuessAccessors.cs
@@ -0,0 +1,124 @@
+
+
+// ClassLibrary1.UnknownClassTest
+using System;
+using System.Collections.Generic;
+
+using UnknownNamespace;
+namespace ClassLibrary1
+{
+ public class UnknownClassTest : EventArgs
+ {
+ public void MethodUnknownClass()
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ UnknownClass val = new UnknownClass();
+ int? unknownProperty = val.UnknownProperty;
+ int? num = unknownProperty.GetValueOrDefault();
+ val.UnknownProperty = num;
+ int? num2 = num;
+ List