}
}
- public override Expression Resolve (TypeContainer tc)
+ public override Expression DoResolve (EmitContext ec)
{
- target = target.Resolve (tc);
- source = source.Resolve (tc);
+ target = target.Resolve (ec);
+ source = source.Resolve (ec);
if (target == null || source == null)
return null;
Type source_type = source.Type;
if (target_type != source_type){
- source = ConvertImplicitRequired (tc, source, target_type, l);
+ source = ConvertImplicitRequired (ec, source, target_type, l);
if (source == null)
return null;
}
if (!(target is LValue)){
- tc.RootContext.Report.Error (131, "Left hand of an assignment must be a variable, a property or an indexer");
+ Report.Error (131, "Left hand of an assignment must be a variable, a property or an indexer");
}
type = target_type;
+ eclass = ExprClass.Value;
return this;
}
if (!is_statement)
ig.Emit (OpCodes.Dup);
- ((LValue) target).Store (ig);
+ ((LValue) target).Store (ec);
} else if (target.ExprClass == ExprClass.PropertyAccess){
// FIXME
throw new Exception ("Can not assign to properties yet");