You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fails, as commented. However, if I add other seemingly unrelated statements, some or all of it may compile. I can find no rhyme or reason to it. If I make the implied declarations top-level, it works. In other situations, the statment co_x only works if the anonymous block following is present. If I comment that block out, then co_x no longer works. Again, I have no idea what I've done to the surrounding codebase to trigger this weird bug.
If I had to guess, I'd say there was 1. an issue with implied instance visibility, and 2. some issue with expressions being typed more completely in some situations than others. But honestly, I'm mystified. Some issues appear to empirically go away if I move everything to top-level declarations, but that is messy from a scoping point of view.
The text was updated successfully, but these errors were encountered:
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 23, 2019
Oh wow! That could explain a lot of weirdness I've been experiencing, particularly if random statements were somehow pulling the implied instances that weren't explicitly imported into scope. I'll hunt for better test cases.
Consider:
This fails, as commented. However, if I add other seemingly unrelated statements, some or all of it may compile. I can find no rhyme or reason to it. If I make the
implied
declarations top-level, it works. In other situations, the statmentco_x
only works if the anonymous block following is present. If I comment that block out, thenco_x
no longer works. Again, I have no idea what I've done to the surrounding codebase to trigger this weird bug.If I had to guess, I'd say there was 1. an issue with implied instance visibility, and 2. some issue with expressions being typed more completely in some situations than others. But honestly, I'm mystified. Some issues appear to empirically go away if I move everything to top-level declarations, but that is messy from a scoping point of view.
The text was updated successfully, but these errors were encountered: