Skip to content

Implicit modifier crashes the typer #2514

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

Closed
abeln opened this issue May 23, 2017 · 4 comments
Closed

Implicit modifier crashes the typer #2514

abeln opened this issue May 23, 2017 · 4 comments

Comments

@abeln
Copy link
Contributor

abeln commented May 23, 2017

The following snippet fails to typecheck, but also crashes the typer:

object Foo {
        def foo(): Int = {
                val f: implicit Int => Int = (implicit x: Int) => 2 * x
                f(2)
        }

}

Results:

Building tests...done
-- [E039] Syntax Error: ../test/kk.scala:6:40 ----------------------------------
6 |		val f: implicit Int => Int = (implicit x: Int) => 2 * x
  |		                                        ^
  |		                                        '=>' expected, but ':' found

exception occurred while typechecking ../test/kk.scala

exception occurred while compiling ../test/kk.scala
Exception in thread "main" java.lang.AssertionError: assertion failed
	at scala.Predef$.assert(Predef.scala:156)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedTypeTree$1.apply(Typer.scala:1010)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedTypeTree$1.apply(Typer.scala:995)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedTypeTree(Typer.scala:994)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1546)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.typedType(Typer.scala:1643)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedValDef$1.apply(Typer.scala:1176)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedValDef$1.apply(Typer.scala:1173)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedValDef(Typer.scala:1173)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1511)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedAppliedTypeTree$1.dotty$tools$dotc$typer$Typer$$anonfun$$typedArg$1(Typer.scala:1078)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedAppliedTypeTree$1$$anonfun$21.apply(Typer.scala:1080)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedAppliedTypeTree$1$$anonfun$21.apply(Typer.scala:1080)
	at dotty.tools.dotc.core.Decorators$ListDecorator$.zipWithConserve$extension(Decorators.scala:108)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedAppliedTypeTree$1.apply(Typer.scala:1080)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedAppliedTypeTree$1.apply(Typer.scala:1051)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedAppliedTypeTree(Typer.scala:1051)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1551)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedFunction$1.apply(Typer.scala:675)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedFunction$1.apply(Typer.scala:671)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:671)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1535)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadType$1.apply(Namer.scala:931)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadType$1.apply(Namer.scala:931)
	at dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:924)
	at dotty.tools.dotc.typer.Namer.typedAheadType(Namer.scala:931)
	at dotty.tools.dotc.typer.Namer.valOrDefDefSig(Namer.scala:1096)
	at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:729)
	at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:777)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:755)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:336)
	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1479)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1504)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadExpr$1.apply(Namer.scala:934)
	at dotty.tools.dotc.typer.Namer$$anonfun$typedAheadExpr$1.apply(Namer.scala:934)
	at dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:924)
	at dotty.tools.dotc.typer.Namer.typedAheadExpr(Namer.scala:934)
	at dotty.tools.dotc.typer.Namer$$anonfun$completeParams$1.apply(Namer.scala:946)
	at dotty.tools.dotc.typer.Namer$$anonfun$completeParams$1.apply(Namer.scala:946)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at dotty.tools.dotc.typer.Namer.completeParams(Namer.scala:946)
	at dotty.tools.dotc.typer.Namer$$anonfun$defDefSig$3.apply(Namer.scala:1131)
	at dotty.tools.dotc.typer.Namer$$anonfun$defDefSig$3.apply(Namer.scala:1131)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1131)
	at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:733)
	at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:777)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:755)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:336)
	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1479)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1504)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1609)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1629)
	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:598)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedBlock$1.apply(Typer.scala:601)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedBlock$1.apply(Typer.scala:600)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:600)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1533)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedFunction$1.apply(Typer.scala:789)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedFunction$1.apply(Typer.scala:671)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:671)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1535)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1641)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedDefDef$1.apply(Typer.scala:1237)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedDefDef$1.apply(Typer.scala:1219)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:1219)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1514)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1609)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1629)
	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:598)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedBlock$1.apply(Typer.scala:601)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedBlock$1.apply(Typer.scala:600)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:600)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1533)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedFunction$1.apply(Typer.scala:789)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedFunction$1.apply(Typer.scala:671)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:671)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1535)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.makeImplicitFunction(Typer.scala:1582)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1569)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1641)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedValDef$1.apply(Typer.scala:1179)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedValDef$1.apply(Typer.scala:1173)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedValDef(Typer.scala:1173)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1511)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1609)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1629)
	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:598)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedBlock$1.apply(Typer.scala:601)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedBlock$1.apply(Typer.scala:600)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:600)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1533)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1641)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedDefDef$1.apply(Typer.scala:1237)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedDefDef$1.apply(Typer.scala:1219)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:1219)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1514)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1609)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1629)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1319)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1267)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1267)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1517)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1609)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1629)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1432)
	at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1419)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:1419)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1556)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)
	at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)
	at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)
	at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1641)
	at dotty.tools.dotc.typer.FrontEnd$$anonfun$typeCheck$1.apply$mcV$sp(FrontEnd.scala:64)
	at dotty.tools.dotc.typer.FrontEnd.monitor(FrontEnd.scala:32)
	at dotty.tools.dotc.typer.FrontEnd.typeCheck(FrontEnd.scala:62)
	at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:93)
	at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:93)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at dotty.tools.dotc.typer.FrontEnd.runOn(FrontEnd.scala:93)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:82)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:79)
	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply$mcV$sp(Run.scala:79)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)
	at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)
	at dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:76)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:67)
	at dotty.tools.dotc.Run.compileSources(Run.scala:64)
	at dotty.tools.dotc.Run.compile(Run.scala:48)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:26)
	at dotty.tools.dotc.Driver.process(Driver.scala:124)
	at dotty.tools.dotc.Driver.process(Driver.scala:93)
	at dotty.tools.dotc.Driver.process(Driver.scala:105)
	at dotty.tools.dotc.Driver.main(Driver.scala:132)
	at dotty.tools.dotc.Main.main(Main.scala)
@nicolasstucki
Copy link
Contributor

@biboudis, this looks similar to #2523.

@nicolasstucki
Copy link
Contributor

nicolasstucki commented May 26, 2017

The failing code can be minimized to

object Foo {
  val f = (implicit x: Int) => x
}

or

object Foo {
  ((implicit x: Int) => x): (implicit Int => Int)
}

@biboudis
Copy link
Contributor

@nicolasstucki still crashes

@nicolasstucki
Copy link
Contributor

@biboudis the fix is available in the a PR

DarkDimius added a commit that referenced this issue Jun 14, 2017
Fix #2514: Survive non-sensical trees in Typer
odersky added a commit that referenced this issue Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants