Skip to content

Commit

Permalink
Add missing check for async scope in array access
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-safar committed Jul 27, 2011
1 parent 2f104f9 commit 45630ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mcs/mcs/expression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8295,7 +8295,7 @@ public void Emit (EmitContext ec, bool leave_copy)
if (prepared) {
ec.EmitLoadFromPtr (type);
} else {
if (!has_await_args.HasValue && ea.Arguments.ContainsEmitWithAwait ()) {
if (!has_await_args.HasValue && ec.HasSet (BuilderContext.Options.AsyncBody) && ea.Arguments.ContainsEmitWithAwait ()) {
LoadInstanceAndArguments (ec, false, true);
}

Expand Down

0 comments on commit 45630ca

Please sign in to comment.