Closed
Description
Reported by @OliverJAsh in #16239:
{
class Foo {}
Foo.bar = 1; // error
const Foo2 = () => {};
Foo2.bar = 1; // error
function FooBar() {}
FooBar.bar = 1; // error
}
None of these should error in JS checking. This may have to do with how we resolve function declarations in block bodies (i.e. we look them up in the containing function scope, not the block scope.