2002-07-12 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Fri, 12 Jul 2002 17:02:11 +0000 (17:02 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Fri, 12 Jul 2002 17:02:11 +0000 (17:02 -0000)
* statement.cs (Unsafe): Ok, so I got the semantics wrong.
Statements *are* currently doing part of their resolution during
Emit.

Expressions do always resolve during resolve, but statements are

svn path=/trunk/mcs/; revision=5738

mcs/mcs/ChangeLog
mcs/mcs/statement.cs

index 7045cb06b31059c3e01f1a0fc6e323fc221a605c..8719bbd7b8fd4ec200c851b8794b05784664764a 100755 (executable)
@@ -1,3 +1,12 @@
+2002-07-12  Miguel de Icaza  <miguel@ximian.com>
+
+       * statement.cs (Unsafe): Ok, so I got the semantics wrong.
+       Statements *are* currently doing part of their resolution during
+       Emit.  
+
+       Expressions do always resolve during resolve, but statements are
+       only required to propagate resolution to their children.
+
 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
 
        * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
index 2a2c44bbcb1b9438c9565305d27604567fd21524..4ec952685bfef4b2a1bce9bb003e68384d9ff0d8 100755 (executable)
@@ -2199,7 +2199,14 @@ namespace Mono.CSharp {
                
                public override bool Emit (EmitContext ec)
                {
-                       return Block.Emit (ec);
+                       bool previous_state = ec.InUnsafe;
+                       bool val;
+                       
+                       ec.InUnsafe = true;
+                       val = Block.Emit (ec);
+                       ec.InUnsafe = previous_state;
+
+                       return val;
                }
        }