dart-archive / kernel

Dart IR (Intermediate Representation) -- moved to dart-lang/sdk
BSD 3-Clause "New" or "Revised" License
20 stars 3 forks source link

Returning from operator[]= is void context. #31

Closed peter-ahe-google closed 8 years ago

peter-ahe-google commented 8 years ago

I've noticed that code like this:

class Context {
  final List list = [];
  operator[]= (int i, value) => list[i] = value;
}

Generates a lot of let expressions in the method body of operator[]=. I think this may be a common pattern, and that this is a void context, so it may be worth tweaking this.

asgerf commented 8 years ago

I sent you a CL with a fix.

asgerf commented 8 years ago

Fixed in 239d77596348966f7e3523452ab0caa84256bf62.