Skip to content

Commit 1e589ac

Browse files
authored
Merge pull request #2849 from dotty-staging/fix-implicits
Fix crash when compiling collection strawman.
2 parents c6fb9cf + f2158c1 commit 1e589ac

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ object SymDenotations {
798798
*/
799799
/** The class implementing this module, NoSymbol if not applicable. */
800800
final def moduleClass(implicit ctx: Context): Symbol = {
801-
def notFound = { println(s"missing module class for $name: $myInfo"); NoSymbol }
801+
def notFound = { completions.println(s"missing module class for $name: $myInfo"); NoSymbol }
802802
if (this is ModuleVal)
803803
myInfo match {
804804
case info: TypeRef => info.symbol

compiler/src/dotty/tools/dotc/typer/Implicits.scala

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ object Implicits {
6060

6161
/** Return those references in `refs` that are compatible with type `pt`. */
6262
protected def filterMatching(pt: Type)(implicit ctx: Context): List[Candidate] = track("filterMatching") {
63-
val ptNorm = normalize(pt, pt) // `pt` could be implicit function types, check i2749
6463

6564
def refMatches(ref: TermRef)(implicit ctx: Context) = /*ctx.traceIndented(i"refMatches $ref $pt")*/ {
6665

@@ -124,8 +123,10 @@ object Implicits {
124123
record("discarded eligible")
125124
false
126125
}
127-
else
126+
else {
127+
val ptNorm = normalize(pt, pt) // `pt` could be implicit function types, check i2749
128128
NoViewsAllowed.isCompatible(normalize(ref, pt), ptNorm)
129+
}
129130
}
130131
}
131132

0 commit comments

Comments
 (0)