Restrict implicit 'this' in at body

Description

I recently accidently captured 'this' while using a field inside an at block without realising that it was a field and not just a local variable in scope. This can really cripple performance and take a while to track down.

Given that we don't have tools to help with this problem, and it is a very easy mistake to make, why don't we just force programmers to capture 'this' explicitly in the rare case that this what they want? It would make it much easier to approximate the cost of an 'at' by reading code.

The extra strictness could be disabled with an annotation on the 'at' if desired.

Environment

None

Status

Assignee

VijayV

Reporter

Dave Cunningham

Labels

None

Components

Fix versions

Affects versions

Priority

High
Configure