Index: mcs/attribute.cs
===================================================================
RCS file: /mono/mcs/mcs/attribute.cs,v
retrieving revision 1.98
diff -u -r1.98 attribute.cs
--- mcs/attribute.cs 7 Nov 2003 07:01:27 -0000 1.98
+++ mcs/attribute.cs 12 Nov 2003 02:49:23 -0000
@@ -137,8 +137,8 @@
if (e is Constant) {
result = ((Constant) e).GetValue ();
return true;
- } else if (e is TypeOf) {
- result = ((TypeOf) e).TypeArg;
+ } else if (e is ITypeOf) {
+ result = ((ITypeOf) e).TypeArg;
return true;
} else if (e is ArrayCreation){
result = ((ArrayCreation) e).EncodeAsAttribute ();
@@ -293,8 +293,8 @@
this.Inherited = (bool) o;
}
- } else if (e is TypeOf) {
- prop_values.Add (((TypeOf) e).TypeArg);
+ } else if (e is ITypeOf) {
+ prop_values.Add (((ITypeOf) e).TypeArg);
} else {
Error_AttributeArgumentNotValid (Location);
return null;
@@ -318,8 +318,8 @@
object value = ((Constant) e).GetValue ();
field_values.Add (value);
- } else if (e is TypeOf) {
- field_values.Add (((TypeOf) e).TypeArg);
+ } else if (e is ITypeOf) {
+ field_values.Add (((ITypeOf) e).TypeArg);
} else {
Error_AttributeArgumentNotValid (Location);
return null;
Index: mcs/expression.cs
===================================================================
RCS file: /mono/mcs/mcs/expression.cs,v
retrieving revision 1.497
diff -u -r1.497 expression.cs
--- mcs/expression.cs 8 Nov 2003 14:49:03 -0000 1.497
+++ mcs/expression.cs 12 Nov 2003 02:49:28 -0000
@@ -6425,11 +6425,18 @@
ec.ig.Emit (OpCodes.Ldarg_0);
}
}
+
+ ///
+ /// This interface is implemented by typeof
+ ///
+ public interface ITypeOf {
+ Type TypeArg { get; }
+ }
///
/// Implements the typeof operator
///
- public class TypeOf : Expression {
+ public class TypeOf : Expression, ITypeOf {
public readonly Expression QueriedType;
Type typearg;
@@ -6471,7 +6478,7 @@
///
/// Implements the `typeof (void)' operator
///
- public class TypeOfVoid : Expression {
+ public class TypeOfVoid : Expression, ITypeOf {
public TypeOfVoid (Location l)
{
loc = l;