diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs index 80998f6fa..86ec9d1cc 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs @@ -392,17 +392,31 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty return () => integerData; } +#if !MCS + // does not compile with mcs... public static Func Issue1773b(object data) { +#if ROSLYN dynamic dynamicData = data; return () => dynamicData.DynamicCall(); +#else + // This is a bug in the old csc: captured dynamic local variables did not have the [DynamicAttribute] + // on the display-class field. + return () => ((dynamic)data).DynamicCall(); +#endif } public static Func Issue1773c(object data) { +#if ROSLYN dynamic dynamicData = data; return () => dynamicData; +#else + return () => (dynamic)data; +#endif } +#endif + #if ROSLYN public static Func Issue1773d((int Integer, string String) data) {