I don't think "directly inside a package" means an...
# announcements
r
I don't think "directly inside a package" means anything that specific...anyway the whole line is "Functions, properties and classes, objects and interfaces can be declared on the "top-level", i.e. directly inside a package:" which doesn't make any distinction between classes/objects vs functions which @James Coggan showed earlier works.
c
You maybe onto something here, but more in the sense of documentation being insufficiently specific. How compiler works though seems right to me.
r
I'm guessing that there is a technical problem here that is probably difficult or inconvenient to solve...but its still a wart on the language that "private" details are still leaking out when something is marked private.