Skip to content

Commit

Permalink
Merge pull request #6897 from dotty-staging/fix-6142
Browse files Browse the repository at this point in the history
Fix #6142: remove unreasonable type change for _
  • Loading branch information
nicolasstucki committed Jul 24, 2019
2 parents 8bd0075 + ac3c430 commit 6f59aa9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/src/dotty/tools/dotc/transform/Erasure.scala
Expand Up @@ -614,10 +614,7 @@ object Erasure {
if (sym.isConstructor) defn.UnitType
else sym.info.resultType
var vparamss1 = (outer.paramDefs(sym) ::: ddef.vparamss.flatten) :: Nil
var rhs1 = ddef.rhs match {
case id @ Ident(nme.WILDCARD) => untpd.TypedSplice(id.withType(restpe))
case _ => ddef.rhs
}
var rhs1 = ddef.rhs
if (sym.isAnonymousFunction && vparamss1.head.length > MaxImplementedFunctionArity) {
val bunchedParam = ctx.newSymbol(sym, nme.ALLARGS, Flags.TermParam, JavaArrayType(defn.ObjectType))
def selector(n: Int) = ref(bunchedParam)
Expand Down
10 changes: 10 additions & 0 deletions tests/pos/i6142.scala
@@ -0,0 +1,10 @@
import scala.quoted._

object O {
def foo given QuoteContext = {
type T
implicit val _: scala.quoted.Type[T] = ???
'[List[T]]
()
}
}

0 comments on commit 6f59aa9

Please sign in to comment.