- if (element is CompoundAssign.TargetExpression) {
- if (first_emit != null)
- throw new InternalErrorException ("Can only handle one mutator at a time");
- first_emit = element;
- element = first_emit_temp = new LocalTemporary (element.Type);
+ var te = element as CompoundAssign.TargetExpression;
+ if (te != null) {
+ for (int i = 1; i < initializers.Count; ++i) {
+ if (initializers [i].ContainsEmitWithAwait ()) {
+ te.RequiresEmitWithAwait = true;
+ break;
+ }
+ }
+
+ if (!te.RequiresEmitWithAwait) {
+ if (first_emit != null)
+ throw new InternalErrorException ("Can only handle one mutator at a time");
+ first_emit = element;
+ element = first_emit_temp = new LocalTemporary (element.Type);
+ }