/// </remarks>
public class SimpleName : Expression {
public string Name;
+ public int NumTypeParameters;
//
// If true, then we are a simple name, not composed with a ".
is_base = true;
}
+ public SimpleName (string name, int num_type_params, Location l)
+ {
+ Name = name;
+ NumTypeParameters = num_type_params;
+ loc = l;
+ is_base = true;
+ }
+
public static void Error_ObjectRefRequired (EmitContext ec, Location l, string name)
{
if (ec.IsFieldInitializer)
if (ec.ResolvingTypeTree){
int errors = Report.Errors;
- Type dt = ds.FindType (loc, Name);
+ Type dt = ds.FindType (loc, Name, NumTypeParameters);
if (Report.Errors != errors)
return null;
return new TypeExpression (dt, loc);
if (alias_value != null){
- if ((t = RootContext.LookupType (ds, alias_value, true, loc)) != null)
+ if ((t = RootContext.LookupType (ds, alias_value, true, NumTypeParameters, loc)) != null)
return new TypeExpression (t, loc);
}
}
// or a namespace.
//
- if ((t = RootContext.LookupType (ds, Name, true, loc)) != null)
+ if ((t = RootContext.LookupType (ds, Name, true, NumTypeParameters, loc)) != null)
return new TypeExpression (t, loc);
// No match, maybe our parent can compose us
{
FieldInfo = fi;
eclass = ExprClass.Variable;
- type = fi.FieldType;
+ type = TypeManager.TypeToCoreType (fi.FieldType);
loc = l;
}