File tree Expand file tree Collapse file tree 5 files changed +40
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 5 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -2720,7 +2720,7 @@ object SymDenotations {
2720
2720
|| owner.isRefinementClass
2721
2721
|| owner.is(Scala2x )
2722
2722
|| owner.unforcedDecls.contains(denot.name, denot.symbol)
2723
- || (denot.is(Synthetic ) && denot.is(ModuleClass ) && stillValidInOwner(denot.companionClass))
2723
+ || (denot.is(Synthetic ) && denot.is(ModuleClass ) && denot.companionClass.exists && stillValidInOwner(denot.companionClass))
2724
2724
|| denot.isSelfSym
2725
2725
|| denot.isLocalDummy)
2726
2726
catch case ex : StaleSymbol => false
Original file line number Diff line number Diff line change
1
+ trait Conversions :
2
+ given conv (using DFBits .Candidate ): Conversion [Int , DFVal ] = ???
3
+
4
+ import scala .quoted .*
5
+ transparent inline def f : Short = $ { getWidthMacro }
6
+ private def getWidthMacro (using Quotes ): Expr [Short ] = ' { ??? }
Original file line number Diff line number Diff line change
1
+ type DFBits = Long
2
+ object DFBits :
3
+ def a : Unit = f // forces suspension of this compilation unit in typer
4
+ def b : DFVal = 2 // uses implicit conversion `DFVal.conv`
5
+
6
+ trait Candidate
7
+ object Candidate :
8
+ given candidate : Candidate = ??? // completed in run 3 but created in run 2
9
+ end DFBits
10
+
11
+ trait DFVal
12
+ object DFVal extends Conversions
Original file line number Diff line number Diff line change
1
+ import outer ._
2
+ trait Conversions :
3
+ given conv (using DFBits .Candidate ): Conversion [Int , DFVal ] = ???
4
+
5
+ import scala .quoted .*
6
+ transparent inline def f : Short = $ { getWidthMacro }
7
+ private def getWidthMacro (using Quotes ): Expr [Short ] = ' { ??? }
Original file line number Diff line number Diff line change
1
+ type outer = Int
2
+ object outer :
3
+ type DFBits = Long
4
+ object DFBits :
5
+ def a : Unit = f // forces suspension of this compilation unit in typer
6
+ def b : DFVal = 2 // uses implicit conversion `DFVal.conv`
7
+
8
+ trait Candidate
9
+ object Candidate :
10
+ given candidate : Candidate = ??? // completed in run 3 but created in run 2
11
+ end DFBits
12
+
13
+ trait DFVal
14
+ object DFVal extends Conversions
You can’t perform that action at this time.
0 commit comments