File tree 2 files changed +15
-2
lines changed
compiler/src/dotty/tools/dotc/core
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -651,8 +651,7 @@ object SymDenotations {
651
651
def containsOpaques (using Context ): Boolean = is(Opaque ) && isClass
652
652
653
653
def seesOpaques (using Context ): Boolean =
654
- containsOpaques ||
655
- is(Module , butNot = Package ) && owner.seesOpaques
654
+ containsOpaques || isClass && ! is(Package ) && owner.seesOpaques
656
655
657
656
/** Is this the denotation of a self symbol of some class?
658
657
* This is the case if one of two conditions holds:
Original file line number Diff line number Diff line change
1
+
2
+ object refined :
3
+ opaque type Positive = Int
4
+
5
+ object Positive extends PositiveFactory
6
+
7
+ trait PositiveFactory :
8
+ inline def apply (value : Int ): Positive = f(value) // error: implementation restriction
9
+ def f (x : Positive ): Positive = x
10
+
11
+ @ main def run : Unit =
12
+ import refined .*
13
+ val x = 9
14
+ val nine = Positive .apply(x)
You can’t perform that action at this time.
0 commit comments