File tree 2 files changed +22
-2
lines changed
compiler/src/dotty/tools/dotc/core
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -1605,10 +1605,10 @@ object SymDenotations {
1605
1605
// children that are defined in the same file as their parents.
1606
1606
def maybeChild (sym : Symbol ) =
1607
1607
(sym.isClass && ! this .is(JavaDefined ) || sym.originDenotation.is(EnumVal ))
1608
- && ! owner.is(Package )
1608
+ && ( ! owner.is(Package )
1609
1609
|| sym.originDenotation.infoOrCompleter.match
1610
1610
case _ : SymbolLoaders .SecondCompleter => sym.associatedFile == this .symbol.associatedFile
1611
- case _ => false
1611
+ case _ => false )
1612
1612
1613
1613
if owner.isClass then
1614
1614
for c <- owner.info.decls.toList if maybeChild(c) do
Original file line number Diff line number Diff line change
1
+ import scala .annotation .showAsInfix
2
+
3
+ object Test {
4
+ trait Component
5
+ sealed trait Deleted extends Component
6
+
7
+ type Deletable [L <: CList ] <: CList = L match {
8
+ case h &: t => (h | Deleted ) &: Deletable [t]
9
+ case CNil => CNil
10
+ }
11
+
12
+ sealed trait CList
13
+ sealed trait CNil extends CList
14
+ @ showAsInfix case class &: [+ C <: Component , + L <: CList ](h : C , t : L ) extends CList
15
+
16
+ case class A (x : Int , y : Int ) extends Component
17
+ case class B (x : Int , y : Int ) extends Component
18
+
19
+ val x : Deletable [A &: B &: CNil ] = ???
20
+ }
You can’t perform that action at this time.
0 commit comments