File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -497,6 +497,15 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
497497 def refine (parent : Type , child : Symbol ): Type = {
498498 if (child.isTerm && child.is(Case , butNot = Module )) return child.termRef // enum vals always match
499499
500+ // <local child> is a place holder from Scalac, it is hopeless to instantiate it.
501+ //
502+ // Quote from scalac (from nsc/symtab/classfile/Pickler.scala):
503+ //
504+ // ...When a sealed class/trait has local subclasses, a single
505+ // <local child> class symbol is added as pickled child
506+ // (instead of a reference to the anonymous class; that was done
507+ // initially, but seems not to work, ...).
508+ //
500509 if (child.name == tpnme.LOCAL_CHILD ) return child.typeRef
501510
502511 val childTp = if (child.isTerm) child.termRef else child.typeRef
You can’t perform that action at this time.
0 commit comments