Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2015-03-26 18:57:36 +0300
committerMarek Safar <marek.safar@gmail.com>2015-03-26 18:58:22 +0300
commit7a5ea5244acb1ed088b2cc18e5c2b3eb61ed1d43 (patch)
tree4b880ac197253eb451c4a19613e9fad21142695b /mcs/tests/test-616.cs
parentcb9586ef9c531bbcfd2cfa27020e8debe873fbfb (diff)
[mcs] Special case flowanalysis of primitive structs. Fixes #28296
Diffstat (limited to 'mcs/tests/test-616.cs')
-rw-r--r--mcs/tests/test-616.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/mcs/tests/test-616.cs b/mcs/tests/test-616.cs
index 6f189e836f2..9994d02ba94 100644
--- a/mcs/tests/test-616.cs
+++ b/mcs/tests/test-616.cs
@@ -25,7 +25,6 @@ namespace System
public struct UInt64 {}
public struct IntPtr {}
public struct UIntPtr {}
- public struct Decimal { }
public class String { }
public class Delegate {}
public class MulticastDelegate {}
@@ -43,6 +42,24 @@ namespace System
public interface IDisposable {}
+ public struct Decimal {
+
+ private int flags;
+
+ public Decimal(int[] bits) {
+ flags = 0;
+ SetBits(bits);
+ }
+
+ public Decimal (int i)
+ {
+ flags = 0;
+ }
+
+ private void SetBits(int[] bits) {
+ }
+ }
+
partial class Type
{
public static bool operator == (Type left, Type right)
@@ -54,6 +71,12 @@ namespace System
{
return true;
}
+
+ void Foo ()
+ {
+ Decimal d = 0;
+ var d2 = d;
+ }
}
}
@@ -73,4 +96,3 @@ namespace System.Reflection
{
public class DefaultMemberAttribute {}
}
-