17e181885f
- Comparing the callable ID with the owner's class ID is the simplest way to check whether a callable is declared inside an owner class. However, this does not work for local classes, because they do not have proper class IDs. The same issue occurs when trying to get the containing class, because it is a lookup tag search in symbol providers. - Given that the scope is only needed for Java classes and local Java classes cannot leak from function bodies, the easiest solution is to disallow creating this scope for local classes. ^KT-61800