* class.cs (MemberBase.CheckParameters): Also check that the type
is unmanaged if it is a pointer.
* expression.cs (SizeOf.Resolve): Add location information.
* statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
a managed type is declared.
svn path=/trunk/mcs/; revision=11983
foreach (DictionaryEntry de in variables){
string name = (string) de.Key;
VariableInfo vi = (VariableInfo) de.Value;
-
+
if (vi.VariableType == null)
continue;
+ Type variable_type = vi.VariableType;
+
+ if (variable_type.IsPointer){
+ //
+ // Am not really convinced that this test is required (Microsoft does it)
+ // but the fact is that you would not be able to use the pointer variable
+ // *anyways*
+ //
+ if (!TypeManager.VerifyUnManaged (variable_type.GetElementType (), vi.Location))
+ continue;
+ }
+
vi.LocalBuilder = ig.DeclareLocal (vi.VariableType);
if (CodeGen.SymbolWriter != null)