Skip to content

Unbreak the build some more #6612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions compiler/src/dotty/tools/dotc/typer/Implicits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ trait Implicits { self: Typer =>
type SpecialHandlers = List[(ClassSymbol, SpecialHandler)]

lazy val synthesizedClassTag: SpecialHandler =
(formal: Type, span: Span) => implicit (ctx: Context) => formal.argInfos match {
(formal, span) => implicit ctx => formal.argInfos match {
case arg :: Nil =>
fullyDefinedType(arg, "ClassTag argument", span) match {
case defn.ArrayOf(elemTp) =>
Expand All @@ -678,7 +678,7 @@ trait Implicits { self: Typer =>
* `T` is deeply dealiassed to avoid references to local type aliases.
*/
lazy val synthesizedTypeTag: SpecialHandler =
(formal: Type, span: Span) => implicit (ctx: Context) => {
(formal, span) => implicit ctx => {
def quotedType(t: Type) = {
if (StagingContext.level == 0)
ctx.compilationUnit.needsStaging = true // We will need to run ReifyQuotes
Expand All @@ -696,12 +696,12 @@ trait Implicits { self: Typer =>
}

lazy val synthesizedTastyContext: SpecialHandler =
(formal: Type, span: Span) => implicit (ctx: Context) =>
(formal, span) => implicit ctx =>
if (ctx.inInlineMethod || enclosingInlineds.nonEmpty) ref(defn.TastyReflection_macroContext)
else EmptyTree

lazy val synthesizedTupleFunction: SpecialHandler =
(formal: Type, span: Span) => implicit (ctx: Context) => formal match {
(formal, span) => implicit ctx => formal match {
case AppliedType(_, funArgs @ fun :: tupled :: Nil) =>
def functionTypeEqual(baseFun: Type, actualArgs: List[Type], actualRet: Type, expected: Type) = {
expected =:= defn.FunctionOf(actualArgs, actualRet, defn.isImplicitFunctionType(baseFun), defn.isErasedFunctionType(baseFun))
Expand Down Expand Up @@ -748,7 +748,7 @@ trait Implicits { self: Typer =>
* `Eql.eqlAny[T, U]` as solution.
*/
lazy val synthesizedEq: SpecialHandler =
(formal: Type, span: Span) => implicit (ctx: Context) => {
(formal, span) => implicit ctx => {

/** Is there an `Eql[T, T]` instance, assuming -strictEquality? */
def hasEq(tp: Type)(implicit ctx: Context): Boolean = {
Expand Down Expand Up @@ -813,7 +813,7 @@ trait Implicits { self: Typer =>
* An EmptyTree is returned if materialization fails.
*/
lazy val synthesizedValueOf: SpecialHandler =
(formal: Type, span: Span) => implicit (ctx: Context) => {
(formal, span) => implicit ctx => {
def success(t: Tree) = New(defn.ValueOfClass.typeRef.appliedTo(t.tpe), t :: Nil).withSpan(span)

formal.argTypes match {
Expand Down Expand Up @@ -873,7 +873,7 @@ trait Implicits { self: Typer =>
* where `T` is a generic product type or a case object or an enum case.
*/
lazy val synthesizedProductMirror: SpecialHandler =
(formal: Type, span: Span) => implicit (ctx: Context) => {
(formal, span) => implicit ctx => {
def mirrorFor(mirroredType0: Type): Tree = {
val mirroredType = mirroredType0.stripTypeVar
mirroredType match {
Expand Down Expand Up @@ -933,7 +933,7 @@ trait Implicits { self: Typer =>
* where `T` is a generic sum type.
*/
lazy val synthesizedSumMirror: SpecialHandler =
(formal: Type, span: Span) => implicit (ctx: Context) => {
(formal, span) => implicit ctx => {
formal.member(tpnme.MirroredType).info match {
case TypeBounds(mirroredType0, _) =>
val mirroredType = mirroredType0.stripTypeVar
Expand Down Expand Up @@ -1008,7 +1008,7 @@ trait Implicits { self: Typer =>
* where `T` is a generic sum or product or singleton type.
*/
lazy val synthesizedMirror: SpecialHandler =
(formal: Type, span: Span) => implicit (ctx: Context) => {
(formal, span) => implicit ctx => {
formal.member(tpnme.MirroredType).info match {
case TypeBounds(mirroredType, _) =>
if (mirroredType.termSymbol.is(CaseVal) || mirroredType.classSymbol.isGenericProduct)
Expand Down