Closed olafurpg closed 7 years ago
- E006 Unbound Identifier Error cf26eeb#commitcomment-21672034
The problem seems to be that the stuff in the package object is not found, I've seen that happen before. The reason is that we cache the package object denotation, but sometimes we cache it before the package object has been entered into scope, so the cache is wrong and never invalidated. I don't know if there's a systematic solution to this, maybe simply dropping the cache assuming it doesn't have a big impact on performance? /cc @odersky
- E007 Type mismatch eae920a#commitcomment-21672052
That's a good one! No clue what's going on but it shouldn't be too hard to debug.
@olafurpg Since these are two separate issues, would you mine splitting this issue into two?
Since these are two separate issues, would you mine splitting this issue into two?
@smarter Done, see #2201. I removed the reference to the second error of the description in this issue.
It's not just a caching problem. The problem is that the first type found is the class type that comes with the DocString object, but that one does not really exist. But by then we don't look in the package object anymore. It's tricky because at the point where we do look into the package object we are not allowed to ask whether the companion class really exists, as that would force too much.
@odersky Ah, I see! So it's not the issue I thought it was.
Fixed by #2205
I confirm that I'm unable to reproduce the error after #2205.
I found one example with type aliases and higher kinded types where scalac reports no type errors while dotc reports E006 Unbound Identifier Error https://github.com/lampepfl/dotty/commit/cf26eeb502b958a4f7b45530acfe74235f0dba0d#commitcomment-21672034
I bumped into this error while trying to compile https://github.com/johnynek/paiges with Dotty. The commands I ran were