Skip to content
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

Dynamic does not work with unapplySeq #9712

Open
scabug opened this issue Mar 21, 2016 · 2 comments
Open

Dynamic does not work with unapplySeq #9712

scabug opened this issue Mar 21, 2016 · 2 comments

Comments

@scabug
Copy link

@scabug scabug commented Mar 21, 2016

Welcome to Scala version 2.11.7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import scala.language.dynamics
import scala.language.dynamics

scala> 

scala> object MyExtractor extends Dynamic {
     | 
     |   case object applyDynamic {
     |     def unapplySeq(a: Any): Option[Seq[Any]] = {
     |       Some(Nil)
     |     }
     |   }
     | 
     | }
defined object MyExtractor

scala> 

scala> val MyExtractor.DynamicExtractor() = 1
java.lang.NullPointerException
	at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$class.inPlaceAdHocOverloadingResolution(PatternTypers.scala:68)
	at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$class.typedConstructorPattern(PatternTypers.scala:81)
	at scala.tools.nsc.typechecker.Typers$Typer.typedConstructorPattern(Typers.scala:111)
	at scala.tools.nsc.typechecker.Typers$Typer.vanillaAdapt$1(Typers.scala:1113)
	at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1166)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5409)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5422)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5369)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5373)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:36)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$99.apply(Typers.scala:4524)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$99.apply(Typers.scala:4524)
	at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:680)
	at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4523)
	at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4579)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5342)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5395)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5422)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5369)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5373)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:36)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$121$$anonfun$apply$55.apply(Typers.scala:5508)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$121.apply(Typers.scala:5508)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$121.apply(Typers.scala:5508)
	at scala.tools.nsc.typechecker.TypeDiagnostics$class.typingInPattern(TypeDiagnostics.scala:62)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1.typingInPattern(ReplGlobal.scala:23)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPattern(Typers.scala:5508)
	at scala.tools.nsc.typechecker.Typers$Typer.typedCase(Typers.scala:2400)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedCases$1.apply(Typers.scala:2440)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedCases$1.apply(Typers.scala:2439)
	at scala.collection.immutable.List.loop$1(List.scala:173)
	at scala.collection.immutable.List.mapConserve(List.scala:189)
	at scala.tools.nsc.typechecker.Typers$Typer.typedCases(Typers.scala:2439)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMatch(Typers.scala:2451)
	at scala.tools.nsc.typechecker.Typers$Typer.typedVirtualizedMatch$1(Typers.scala:4310)
	at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5321)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5352)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5395)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5422)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5369)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5373)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:36)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5462)
	at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:5553)
	at scala.tools.nsc.typechecker.Namers$Namer.assignTypeToTree(Namers.scala:880)
	at scala.tools.nsc.typechecker.Namers$Namer.valDefSig(Namers.scala:1382)
	at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1533)
	at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1542)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:782)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:781)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:781)
	at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1569)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:781)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:773)
	at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1685)
	at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1693)
	at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1683)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1489)
	at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1634)
	at scala.tools.nsc.typechecker.MethodSynthesis$MethodSynth$class.warnForDroppedAnnotations(MethodSynthesis.scala:167)
	at scala.tools.nsc.typechecker.MethodSynthesis$MethodSynth$class.addDerivedTrees(MethodSynthesis.scala:201)
	at scala.tools.nsc.typechecker.Namers$Namer.addDerivedTrees(Namers.scala:54)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$25.apply(Typers.scala:1908)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$25.apply(Typers.scala:1908)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1845)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1842)
	at scala.collection.immutable.List.flatMap(List.scala:327)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1908)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1808)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5309)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5358)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5395)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5422)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5369)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5373)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:36)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5451)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3047)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
	at scala.collection.immutable.List.loop$1(List.scala:173)
	at scala.collection.immutable.List.mapConserve(List.scala:189)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3151)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1921)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1808)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5309)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5358)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5395)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5422)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5369)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5373)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:36)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5451)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3047)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
	at scala.collection.immutable.List.loop$1(List.scala:173)
	at scala.collection.immutable.List.mapConserve(List.scala:189)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3151)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1921)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1808)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5309)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5358)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5395)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5422)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5369)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5373)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:36)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5451)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3047)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
	at scala.collection.immutable.List.loop$1(List.scala:173)
	at scala.collection.immutable.List.mapConserve(List.scala:189)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3151)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5014)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5311)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5358)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5395)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5422)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5369)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5373)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:36)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5447)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:440)
	at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:431)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:440)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:94)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:93)
	at scala.collection.Iterator$class.foreach(Iterator.scala:742)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1501)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1486)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1481)
	at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:434)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:853)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:811)
	at scala.tools.nsc.interpreter.IMain$Request.compile$lzycompute(IMain.scala:995)
	at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:990)
	at scala.tools.nsc.interpreter.IMain.compile(IMain.scala:577)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:565)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:563)
	at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:802)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:836)
	at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:694)
	at scala.tools.nsc.interpreter.ILoop.processLine(ILoop.scala:404)
	at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:424)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:925)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:911)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:911)
	at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)
	at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:911)
	at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74)
	at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)
	at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)
	at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)
	at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

That entry seems to have slain the compiler.  Shall I replay
your session? I can re-run each line except the last one.
[y/n]
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Mar 21, 2016

Imported From: https://issues.scala-lang.org/browse/SI-9712?orig=1
Reporter: @Atry
Affected Versions: 2.10.6, 2.11.7, 2.11.8, 2.12.0-M3

@Atry

This comment has been minimized.

Copy link

@Atry Atry commented Aug 19, 2018

Another reproduction copied from #11090

Welcome to Scala 2.12.5 (GraalVM 1.0.0-rc2, Java 1.8.0_171).
Type in expressions for evaluation. Or try :help.

scala> import scala.language.dynamics
import scala.language.dynamics

scala> object O extends Dynamic
defined object O

scala> "" match {
     |   case O.a(b) =>
     | }
java.lang.NullPointerException
	at scala.tools.nsc.typechecker.PatternTypers$PatternTyper.typedConstructorPattern(PatternTypers.scala:61)
	at scala.tools.nsc.typechecker.PatternTypers$PatternTyper.typedConstructorPattern$(PatternTypers.scala:70)
	at scala.tools.nsc.typechecker.Typers$Typer.typedConstructorPattern(Typers.scala:111)
	at scala.tools.nsc.typechecker.Typers$Typer.vanillaAdapt$1(Typers.scala:1173)
	at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1231)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5654)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$29(Typers.scala:4706)
	at scala.tools.nsc.typechecker.Typers$Typer.reportError$2(Typers.scala:4706)
	at scala.tools.nsc.typechecker.Typers$Typer.onError$3(Typers.scala:4749)
	at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4774)
	at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4801)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5586)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$50(Typers.scala:4938)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$silent$2(Typers.scala:714)
	at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:714)
	at scala.tools.nsc.typechecker.Typers$Typer$dyna$.wrapErrors(Typers.scala:4247)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$49(Typers.scala:4938)
	at scala.tools.nsc.typechecker.Typers$Typer.asDynamicCall$1(Typers.scala:4937)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$54(Typers.scala:4995)
	at scala.tools.nsc.typechecker.Typers$Typer.handleMissing$1(Typers.scala:4995)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5000)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5064)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5587)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$38(Typers.scala:4752)
	at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:700)
	at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4754)
	at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4801)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5586)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedPattern$2(Typers.scala:5760)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedPattern$1(Typers.scala:5760)
	at scala.tools.nsc.typechecker.TypeDiagnostics.typingInPattern(TypeDiagnostics.scala:63)
	at scala.tools.nsc.typechecker.TypeDiagnostics.typingInPattern$(TypeDiagnostics.scala:60)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1.typingInPattern(ReplGlobal.scala:26)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPattern(Typers.scala:5760)
	at scala.tools.nsc.typechecker.Typers$Typer.typedCase(Typers.scala:2517)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedCases$1(Typers.scala:2551)
	at scala.tools.nsc.typechecker.Typers$Typer.typedCases(Typers.scala:2550)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMatch(Typers.scala:2562)
	at scala.tools.nsc.typechecker.Typers$Typer.typedVirtualizedMatch$1(Typers.scala:4483)
	at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5596)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5714)
	at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:5802)
	at scala.tools.nsc.typechecker.Namers$Namer.assignTypeToTree(Namers.scala:1079)
	at scala.tools.nsc.typechecker.Namers$Namer.valDefSig(Namers.scala:1629)
	at scala.tools.nsc.typechecker.Namers$Namer.memberSig(Namers.scala:1798)
	at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1763)
	at scala.tools.nsc.typechecker.Namers$Namer$ValTypeCompleter.completeImpl(Namers.scala:910)
	at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter.complete(Namers.scala:1960)
	at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter.complete$(Namers.scala:1958)
	at scala.tools.nsc.typechecker.Namers$TypeCompleterBase.complete(Namers.scala:1953)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1532)
	at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1680)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5255)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5703)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3129)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3274)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3274)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:2006)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1876)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5553)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5602)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5703)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3129)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3274)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3274)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:2006)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1876)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5553)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5602)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5703)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3129)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3274)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3274)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:2006)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1876)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5553)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5602)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5703)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3129)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3274)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3274)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5262)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5555)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5602)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5699)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:104)
	at scala.tools.nsc.Global$GlobalPhase.$anonfun$applyPhase$1(Global.scala:426)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:419)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.$anonfun$run$1(Analyzer.scala:94)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.$anonfun$run$1$adapted(Analyzer.scala:93)
	at scala.collection.Iterator.foreach(Iterator.scala:944)
	at scala.collection.Iterator.foreach$(Iterator.scala:944)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1432)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1446)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1430)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1423)
	at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:433)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:802)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:760)
	at scala.tools.nsc.interpreter.IMain$Request.compile$lzycompute(IMain.scala:949)
	at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:944)
	at scala.tools.nsc.interpreter.IMain.compile(IMain.scala:602)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:591)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:563)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:869)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:887)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:887)
	at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:737)
	at scala.tools.nsc.interpreter.ILoop.processLine(ILoop.scala:455)
	at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:476)
	at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:1052)
	at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:82)
	at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:85)
	at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:96)
	at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:101)
	at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

That entry seems to have slain the compiler.  Shall I replay
your session? I can re-run each line except the last one.
[y/n]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.