-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Failed to derive mirror in trait with self type #18918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
given that we can call |
I just now realised I accidentally used the compiler version 3.3.0, but I have verified that the same issue exists on 3.3.1. |
@bishabosha when checking if we have access through inheritance, we first get the classSymbol of the SingletonType. I tried this fix, but this this neg test also passes as a result: class Outer2 {
sealed trait Item
case object A extends Item
}
def testOuter2 =
// discussion point: should we allow this, or only allow singleton prefix?
val m_Outer2_Item = summon[Mirror.Of[Outer2#Item]] // error: Item is not accessible from m_Outer2_Item |
Prefixes should only be valid paths so yeah all singleton types |
@bishabosha Candidate for a backport ? |
Compiler version
3.3.0
Minimized code
Output
Expectation
summon[deriving.Mirror.Of[InnerTrait]]
fails inside of TraitWithSelfType, but no of the other three summons fails. I'm not 100% sure this is actually a bug, but sinceOtherTrait
does not actually do anything it sure seems like it. If it in fact works as intended, I would appreciate a short explanation why.The text was updated successfully, but these errors were encountered: