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>2006-03-31 21:43:52 +0400
committerMarek Safar <marek.safar@gmail.com>2006-03-31 21:43:52 +0400
commit6e0eaeded5468e30e33a71e1b907abfa927cac95 (patch)
tree6280010042c96c38955b6775b45296763e946267 /mcs/tests/test-349.cs
parent698c605c356dc59552f82e19b0565fddd427769d (diff)
2006-03-31 Marek Safar <marek.safar@seznam.cz>
* assign.cs (LocalTemporary): Don't require ILGenerator in the resolve phase. * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after LocalTemporary change. * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from TypeContainer. (ClassOrStruct.DefineFieldInitializers): Implemented static fields initializers optimization. (ClassOrStruct.TypeAttr): Moved from modifiers. (Constructor.CheckBase): Don't crash when static ctor has parameters. (FieldBase.ResolveInitializer): Resolves initializer. (FieldBase.HasDefaultInitializer): New property. * cs-parser.jay: Removed message. * expression.cs (CompilerGeneratedThis): New specialization. * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr svn path=/trunk/mcs/; revision=58851
Diffstat (limited to 'mcs/tests/test-349.cs')
-rw-r--r--mcs/tests/test-349.cs54
1 files changed, 42 insertions, 12 deletions
diff --git a/mcs/tests/test-349.cs b/mcs/tests/test-349.cs
index 242ceb11f12..e894690a3be 100644
--- a/mcs/tests/test-349.cs
+++ b/mcs/tests/test-349.cs
@@ -1,26 +1,56 @@
// Compiler options: -optimize+
-// TODO: I will have to investigate how to test that ctor is really empty
+// TODO: I will have to investigate how to test that instance ctor is really empty
+// GetMethodBody in 2.0
+
using System;
+using System.Reflection;
-class C
-{
- public C () {}
+class C {
+ public C () {}
- int i = new int ();
+ int i = new int ();
int i2 = 1 - 1;
- double d = new double ();
- char c = new char ();
- bool b = new bool ();
- decimal dec2 = new decimal ();
+ double d = new double ();
+ char c = new char ();
+ bool b = new bool ();
+ decimal dec2 = new decimal ();
object o = null;
ValueType BoolVal = (ValueType)null;
int[] a_i = null;
object[] a_o = null;
ValueType[] a_v = null;
+}
+
+class X
+{
+ public delegate void D();
+ public static event D Ev1 = null;
+ public static event D Ev2 = null;
+ protected static string temp = null, real_temp = null;
+}
- public static void Main ()
- {
- }
+class X2
+{
+ static int i = 5;
}
+
+
+class Test
+{
+ static int a = b = 5;
+ static int b = 0;
+
+ static int Main ()
+ {
+ if (a != 5 || b != 0)
+ return 1;
+
+ if ((typeof (X2).Attributes & TypeAttributes.BeforeFieldInit) == 0)
+ return 2;
+
+ Console.WriteLine ("OK");
+ return 0;
+ }
+} \ No newline at end of file