+2004-04-07 Miguel de Icaza <miguel@ximian.com>
+
+ * typemanager.cs: Add new types to lookup: System.TypedReference
+ and ArgIterator.
+
+ * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
+ check for TypedReference or ArgIterator, they are not allowed.
+
+ * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
+ makes us properly catch 1510 in some conditions (see bug 56016 for
+ details).
+
2004-04-06 Bernie Solomon <bernard@ugsolutions.com>
* CryptoConvert.cs: update from corlib version
public BoxedCast (Expression expr)
: base (expr, TypeManager.object_type)
{
+ eclass = ExprClass.Value;
}
public BoxedCast (Expression expr, Type target_type)
: base (expr, target_type)
{
+ eclass = ExprClass.Value;
}
public override Expression DoResolve (EmitContext ec)
pr.AddressOf (ec, mode);
}
- } else
+ } else {
((IMemoryLocation)Expr).AddressOf (ec, mode);
+ }
} else
Expr.Emit (ec);
}
return false;
}
+ if ((ModFlags & Parameter.Modifier.ISBYREF) != 0){
+ if (parameter_type == TypeManager.typed_reference_type ||
+ parameter_type == TypeManager.arg_iterator_type){
+ Report.Error (1601, l,
+ "out or ref parameter can not be of type TypedReference or ArgIterator");
+ return false;
+ }
+ }
+
return parameter_type != null;
}
static public object conditional_attribute_type;
static public Type in_attribute_type;
static public Type cls_compliant_attribute_type;
+ static public Type typed_reference_type;
+ static public Type arg_iterator_type;
//
// An empty array of types
marshal_as_attr_type = CoreLookupType ("System.Runtime.InteropServices.MarshalAsAttribute");
param_array_type = CoreLookupType ("System.ParamArrayAttribute");
in_attribute_type = CoreLookupType ("System.Runtime.InteropServices.InAttribute");
+ typed_reference_type = CoreLookupType ("System.TypedReference");
+ arg_iterator_type = CoreLookupType ("System.ArgIterator");
//
// Sigh. Remove this before the release. Wonder what versions of Mono