Open
Description
This is a followup to the following message:
#14810 (comment)
The PR doesn't need to alter this piece of code in the end, but the need to check the following invariant remains:
"All symbols other than ones that are either defined in java, or synthetic-permanent (or potentially from Scala 2) have a position"
The goal of this issue is therefore to propose for this invariant to be checked
@smarter said a good place for it might be https://github.com/lampepfl/dotty/blob/4a112523a9ef884209a8f733f9f5e44ec7c7cf4d/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala#L68
As some code is already provided in the message above, and the changes needed are probably small, this might be a candidate for "Good first issue" ?