From df423753f1fc9967b87e94f85181f8067e000d8f Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Wed, 25 Mar 2015 19:15:56 +0100 Subject: [PATCH] Revert "[mcs] Special case flowanalysis of primitive structs only when they are imported. Fixes #28296" This reverts commit b50e898ece06bf7dacbea6211406cca1af5ea5af. --- mcs/mcs/flowanalysis.cs | 2 +- mcs/tests/test-616.cs | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/mcs/mcs/flowanalysis.cs b/mcs/mcs/flowanalysis.cs index 2fee651bed9..da30a3e5b90 100644 --- a/mcs/mcs/flowanalysis.cs +++ b/mcs/mcs/flowanalysis.cs @@ -262,7 +262,7 @@ namespace Mono.CSharp public static StructInfo GetStructInfo (TypeSpec type, IMemberContext context) { - if (type.BuiltinType > 0 && type.MemberDefinition.IsImported) + if (type.BuiltinType > 0) return null; StructInfo info; diff --git a/mcs/tests/test-616.cs b/mcs/tests/test-616.cs index d4adf2c26d4..6f189e836f2 100644 --- a/mcs/tests/test-616.cs +++ b/mcs/tests/test-616.cs @@ -25,6 +25,7 @@ namespace System public struct UInt64 {} public struct IntPtr {} public struct UIntPtr {} + public struct Decimal { } public class String { } public class Delegate {} public class MulticastDelegate {} @@ -42,19 +43,6 @@ namespace System public interface IDisposable {} - public struct Decimal { - - private int flags; - - public Decimal(int[] bits) { - flags = 0; - SetBits(bits); - } - - private void SetBits(int[] bits) { - } - } - partial class Type { public static bool operator == (Type left, Type right) -- 2.25.1