File tree 1 file changed +4
-0
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import printing._
12
12
13
13
import scala .annotation .internal .sharable
14
14
import Denotations .{Denotation , SingleDenotation }
15
+ import SymDenotations .NoDenotation
15
16
16
17
/** Types that represent a path. Can either be a TermRef or a SkolemType. */
17
18
type PathType = TermRef | SkolemType
@@ -283,9 +284,12 @@ final class ProperGadtConstraint private(
283
284
case TypeAlias (_) => true
284
285
case _ => false
285
286
287
+ def nonPrivate : Boolean = ! denot1.isInstanceOf [NoDenotation .type ]
288
+
286
289
(denot1.symbol.is(Flags .Deferred ) || isTypeAlias)
287
290
&& ! denot1.symbol.is(Flags .Opaque )
288
291
&& ! denot1.symbol.isClass
292
+ && nonPrivate
289
293
}
290
294
291
295
private def isConstrainableTypeMember (path : PathType , sym : Symbol )(using Context ): Boolean =
You can’t perform that action at this time.
0 commit comments