File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -236,8 +236,9 @@ object Implicits {
236
236
}
237
237
238
238
239
- if (refs.isEmpty) Nil
240
- else {
239
+ if refs.isEmpty && (! considerExtension || companionRefs.isEmpty) then
240
+ Nil
241
+ else
241
242
val nestedCtx = ctx.fresh.addMode(Mode .TypevarsMissContext )
242
243
243
244
def matchingCandidate (ref : ImplicitRef , extensionOnly : Boolean ): Option [Candidate ] =
@@ -254,7 +255,6 @@ object Implicits {
254
255
val implicitCandidates =
255
256
refs.flatMap(matchingCandidate(_, extensionOnly = false ))
256
257
extensionCandidates ::: implicitCandidates
257
- }
258
258
}
259
259
}
260
260
@@ -1652,6 +1652,8 @@ final class SearchRoot extends SearchHistory {
1652
1652
sealed class TermRefSet (using Context ):
1653
1653
private val elems = new java.util.LinkedHashMap [TermSymbol , List [Type ]]
1654
1654
1655
+ def isEmpty = elems.size == 0
1656
+
1655
1657
def += (ref : TermRef ): Unit = {
1656
1658
val pre = ref.prefix
1657
1659
val sym = ref.symbol.asTerm
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ object A {
9
9
type FlagSet = opaques.FlagSet
10
10
def FlagSet (bits : Long ): FlagSet = opaques.FlagSet (bits)
11
11
12
- extension on (xs : FlagSet ) {
12
+ extension (xs : FlagSet ) {
13
13
def bits : Long = opaques.toBits(xs)
14
14
def | (ys : FlagSet ): FlagSet = FlagSet (xs.bits | ys.bits)
15
15
}
You can’t perform that action at this time.
0 commit comments