Scalac 2.11.8 NullPointerException crash in ScalacPatternExpander.applyMethodTypes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Scalac 2.11.8 NullPointerException crash in ScalacPatternExpander.applyMethodTypes

William Harvey
Hi Everyone,

I am getting a 2.11.8 compiler crash that I think is related to some pattern matching.  Here is a self-contained example:

object Bug {
  sealed trait Bippy
  case class Bar() extends Bippy
  case class Baz() extends Bippy
 
  implicit class Naughty(self: String) {
  }
 
  val x: Bippy = ???
 
  x match {
    case Naughty.Bar() => ???
  }
}

The compiler meltdown happens when the match block is added.  The match is invalid and the compiler should reject it, but the crash is unexpected.  I think the feature interaction of implicit classes and pattern matching could be a starting point for investigation.

It looks like someone else may have stumbled on this too:  http://stackoverflow.com/questions/31007147/play-2-4-0-java-lang-nullpointerexception-on-all-http-requests

The stack trace is included at the end of this message (note: This comes from the Scala IDE, but I get the same thing when compiling in SBT).

Is this a known bug?  If not, should I report it?

Thanks!

William

java.lang.NullPointerException
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$ScalacPatternExpander$class.applyMethodTypes(ScalacPatternExpanders.scala:65)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.applyMethodTypes(ScalacPatternExpanders.scala:97)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:136)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$ExtractorCall$.apply(MatchTranslation.scala:384)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractor$lzycompute(MatchTranslation.scala:71)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractor(MatchTranslation.scala:71)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.paramType$1(MatchTranslation.scala:113)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractorStep(MatchTranslation.scala:129)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.nextStep(MatchTranslation.scala:151)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.translate(MatchTranslation.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translatePattern(MatchTranslation.scala:318)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translatePattern(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translateCase(MatchTranslation.scala:315)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translateCase(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$$anonfun$2.apply(MatchTranslation.scala:235)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$$anonfun$2.apply(MatchTranslation.scala:235)
    at scala.collection.immutable.List.map(List.scala:273)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translateMatch(MatchTranslation.scala:235)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translateMatch(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:62)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1378)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1347)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1370)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:62)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1378)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1347)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1363)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1361)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1360)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1404)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:40)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
    at scala.reflect.internal.Trees$$anonfun$itransform$5.apply(Trees.scala:1413)
    at scala.reflect.internal.Trees$$anonfun$itransform$5.apply(Trees.scala:1412)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1411)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1425)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:42)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:42)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:42)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:147)
    at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
    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.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.collection.Iterator$class.foreach(Iterator.scala:893)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:398)
    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.Global$Run.compile(Global.scala:1582)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:75)
    at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:50)
    at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:65)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
    at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:62)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:61)
    at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:89)
    at sbt.inc.Incremental$.compile(Incremental.scala:61)
    at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
    at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
    at org.scalaide.core.internal.builder.zinc.CachingCompiler.compile(CachingCompiler.scala:37)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.aggressiveCompile(EclipseSbtBuildManager.scala:213)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.runCompiler(EclipseSbtBuildManager.scala:145)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.update(EclipseSbtBuildManager.scala:127)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.build(EclipseSbtBuildManager.scala:85)
    at org.scalaide.core.internal.project.scopes.BuildScopeUnit.build(BuildScopeUnit.scala:73)
    at org.scalaide.core.internal.project.SbtScopesBuildManager$$anonfun$build$1.apply(SbtScopesBuildManager.scala:54)
    at org.scalaide.core.internal.project.SbtScopesBuildManager$$anonfun$build$1.apply(SbtScopesBuildManager.scala:51)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at org.scalaide.core.internal.project.SbtScopesBuildManager.build(SbtScopesBuildManager.scala:51)
    at org.scalaide.core.internal.project.ScalaProject.build(ScalaProject.scala:603)
    at org.scalaide.core.internal.builder.ScalaBuilder.build(ScalaBuilder.scala:109)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Scalac 2.11.8 NullPointerException crash in ScalacPatternExpander.applyMethodTypes

som-snytt

Fewer parts:

Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.

scala> object X { implicit class Y(self: String) } // or object X { def Y(s: String): Int = 42 }
defined object X

scala> (null: Any) match { case X.Y.Z() => }
java.lang.NullPointerException
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$ScalacPatternExpander$class.applyMethodTypes(ScalacPatternExpanders.scala:65)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.applyMethodTypes(ScalacPatternExpanders.scala:97)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:136)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$ExtractorCall$.apply(MatchTranslation.scala:384)


or without parens a different crash:

scala> object X { implicit class Y(self: String) }
defined object X

scala> (null: Any) match { case X.Y.Z => }
java.lang.NullPointerException
    at scala.tools.nsc.ast.TreeInfo$ValueClass$$anonfun$valueUnbox$1.apply(TreeInfo.scala:45)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$$anonfun$valueUnbox$1.apply(TreeInfo.scala:45)
    at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$.valueUnbox(TreeInfo.scala:45)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$Unbox$.unapply(TreeInfo.scala:50)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$BoxAndUnbox$.unapply(TreeInfo.scala:63)
    at scala.tools.nsc.transform.PostErasure$PostErasureTransformer.transform(PostErasure.scala:37)
    at scala.tools.nsc.transform.PostErasure$PostErasureTransformer.transform(PostErasure.scala:22)


failing the same way on 2.12.


On Friday, December 2, 2016 at 7:20:39 AM UTC-8, [hidden email] wrote:
Hi Everyone,

I am getting a 2.11.8 compiler crash that I think is related to some pattern matching.  Here is a self-contained example:

object Bug {
  sealed trait Bippy
  case class Bar() extends Bippy
  case class Baz() extends Bippy
 
  implicit class Naughty(self: String) {
  }
 
  val x: Bippy = ???
 
  x match {
    case Naughty.Bar() => ???
  }
}

The compiler meltdown happens when the match block is added.  The match is invalid and the compiler should reject it, but the crash is unexpected.  I think the feature interaction of implicit classes and pattern matching could be a starting point for investigation.

It looks like someone else may have stumbled on this too:  <a href="http://stackoverflow.com/questions/31007147/play-2-4-0-java-lang-nullpointerexception-on-all-http-requests" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F31007147%2Fplay-2-4-0-java-lang-nullpointerexception-on-all-http-requests\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpKRl0KIQ5XRKQMklIyglp8Lxu0g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F31007147%2Fplay-2-4-0-java-lang-nullpointerexception-on-all-http-requests\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpKRl0KIQ5XRKQMklIyglp8Lxu0g&#39;;return true;">http://stackoverflow.com/questions/31007147/play-2-4-0-java-lang-nullpointerexception-on-all-http-requests

The stack trace is included at the end of this message (note: This comes from the Scala IDE, but I get the same thing when compiling in SBT).

Is this a known bug?  If not, should I report it?

Thanks!

William

java.lang.NullPointerException
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$ScalacPatternExpander$class.applyMethodTypes(ScalacPatternExpanders.scala:65)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.applyMethodTypes(ScalacPatternExpanders.scala:97)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:136)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$ExtractorCall$.apply(MatchTranslation.scala:384)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractor$lzycompute(MatchTranslation.scala:71)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractor(MatchTranslation.scala:71)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.paramType$1(MatchTranslation.scala:113)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractorStep(MatchTranslation.scala:129)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.nextStep(MatchTranslation.scala:151)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.translate(MatchTranslation.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translatePattern(MatchTranslation.scala:318)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translatePattern(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translateCase(MatchTranslation.scala:315)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translateCase(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$$anonfun$2.apply(MatchTranslation.scala:235)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$$anonfun$2.apply(MatchTranslation.scala:235)
    at scala.collection.immutable.List.map(List.scala:273)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translateMatch(MatchTranslation.scala:235)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translateMatch(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:62)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1378)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1347)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1370)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:62)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1378)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1347)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1363)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1361)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1360)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1404)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:40)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
    at scala.reflect.internal.Trees$$anonfun$itransform$5.apply(Trees.scala:1413)
    at scala.reflect.internal.Trees$$anonfun$itransform$5.apply(Trees.scala:1412)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1411)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1425)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:42)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:42)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:42)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:147)
    at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
    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.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.collection.Iterator$class.foreach(Iterator.scala:893)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:398)
    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.Global$Run.compile(Global.scala:1582)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:75)
    at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:50)
    at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:65)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
    at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:62)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:61)
    at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:89)
    at sbt.inc.Incremental$.compile(Incremental.scala:61)
    at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
    at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
    at org.scalaide.core.internal.builder.zinc.CachingCompiler.compile(CachingCompiler.scala:37)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.aggressiveCompile(EclipseSbtBuildManager.scala:213)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.runCompiler(EclipseSbtBuildManager.scala:145)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.update(EclipseSbtBuildManager.scala:127)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.build(EclipseSbtBuildManager.scala:85)
    at org.scalaide.core.internal.project.scopes.BuildScopeUnit.build(BuildScopeUnit.scala:73)
    at org.scalaide.core.internal.project.SbtScopesBuildManager$$anonfun$build$1.apply(SbtScopesBuildManager.scala:54)
    at org.scalaide.core.internal.project.SbtScopesBuildManager$$anonfun$build$1.apply(SbtScopesBuildManager.scala:51)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at org.scalaide.core.internal.project.SbtScopesBuildManager.build(SbtScopesBuildManager.scala:51)
    at org.scalaide.core.internal.project.ScalaProject.build(ScalaProject.scala:603)
    at org.scalaide.core.internal.builder.ScalaBuilder.build(ScalaBuilder.scala:109)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Scalac 2.11.8 NullPointerException crash in ScalacPatternExpander.applyMethodTypes

som-snytt

https://issues.scala-lang.org/browse/SI-10090

On Monday, December 5, 2016 at 12:10:30 AM UTC-8, som-snytt wrote:

Fewer parts:

Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.

scala> object X { implicit class Y(self: String) } // or object X { def Y(s: String): Int = 42 }
defined object X

scala> (null: Any) match { case X.Y.Z() => }
java.lang.NullPointerException
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$ScalacPatternExpander$class.applyMethodTypes(ScalacPatternExpanders.scala:65)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.applyMethodTypes(ScalacPatternExpanders.scala:97)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:136)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$ExtractorCall$.apply(MatchTranslation.scala:384)


or without parens a different crash:

scala> object X { implicit class Y(self: String) }
defined object X

scala> (null: Any) match { case X.Y.Z => }
java.lang.NullPointerException
    at scala.tools.nsc.ast.TreeInfo$ValueClass$$anonfun$valueUnbox$1.apply(TreeInfo.scala:45)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$$anonfun$valueUnbox$1.apply(TreeInfo.scala:45)
    at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$.valueUnbox(TreeInfo.scala:45)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$Unbox$.unapply(TreeInfo.scala:50)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$BoxAndUnbox$.unapply(TreeInfo.scala:63)
    at scala.tools.nsc.transform.PostErasure$PostErasureTransformer.transform(PostErasure.scala:37)
    at scala.tools.nsc.transform.PostErasure$PostErasureTransformer.transform(PostErasure.scala:22)


failing the same way on 2.12.


On Friday, December 2, 2016 at 7:20:39 AM UTC-8, [hidden email] wrote:
Hi Everyone,

I am getting a 2.11.8 compiler crash that I think is related to some pattern matching.  Here is a self-contained example:

object Bug {
  sealed trait Bippy
  case class Bar() extends Bippy
  case class Baz() extends Bippy
 
  implicit class Naughty(self: String) {
  }
 
  val x: Bippy = ???
 
  x match {
    case Naughty.Bar() => ???
  }
}

The compiler meltdown happens when the match block is added.  The match is invalid and the compiler should reject it, but the crash is unexpected.  I think the feature interaction of implicit classes and pattern matching could be a starting point for investigation.

It looks like someone else may have stumbled on this too:  <a href="http://stackoverflow.com/questions/31007147/play-2-4-0-java-lang-nullpointerexception-on-all-http-requests" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F31007147%2Fplay-2-4-0-java-lang-nullpointerexception-on-all-http-requests\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpKRl0KIQ5XRKQMklIyglp8Lxu0g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F31007147%2Fplay-2-4-0-java-lang-nullpointerexception-on-all-http-requests\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpKRl0KIQ5XRKQMklIyglp8Lxu0g&#39;;return true;">http://stackoverflow.com/questions/31007147/play-2-4-0-java-lang-nullpointerexception-on-all-http-requests

The stack trace is included at the end of this message (note: This comes from the Scala IDE, but I get the same thing when compiling in SBT).

Is this a known bug?  If not, should I report it?

Thanks!

William

java.lang.NullPointerException
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$ScalacPatternExpander$class.applyMethodTypes(ScalacPatternExpanders.scala:65)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.applyMethodTypes(ScalacPatternExpanders.scala:97)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:136)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$ExtractorCall$.apply(MatchTranslation.scala:384)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractor$lzycompute(MatchTranslation.scala:71)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractor(MatchTranslation.scala:71)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.paramType$1(MatchTranslation.scala:113)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractorStep(MatchTranslation.scala:129)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.nextStep(MatchTranslation.scala:151)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.translate(MatchTranslation.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translatePattern(MatchTranslation.scala:318)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translatePattern(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translateCase(MatchTranslation.scala:315)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translateCase(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$$anonfun$2.apply(MatchTranslation.scala:235)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$$anonfun$2.apply(MatchTranslation.scala:235)
    at scala.collection.immutable.List.map(List.scala:273)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translateMatch(MatchTranslation.scala:235)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translateMatch(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:62)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1378)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1347)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1370)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:62)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1378)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1347)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1363)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1361)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1360)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1404)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:40)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
    at scala.reflect.internal.Trees$$anonfun$itransform$5.apply(Trees.scala:1413)
    at scala.reflect.internal.Trees$$anonfun$itransform$5.apply(Trees.scala:1412)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1411)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1425)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:42)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:42)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:42)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:147)
    at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
    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.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.collection.Iterator$class.foreach(Iterator.scala:893)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:398)
    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.Global$Run.compile(Global.scala:1582)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:75)
    at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:50)
    at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:65)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
    at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:62)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:61)
    at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:89)
    at sbt.inc.Incremental$.compile(Incremental.scala:61)
    at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
    at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
    at org.scalaide.core.internal.builder.zinc.CachingCompiler.compile(CachingCompiler.scala:37)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.aggressiveCompile(EclipseSbtBuildManager.scala:213)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.runCompiler(EclipseSbtBuildManager.scala:145)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.update(EclipseSbtBuildManager.scala:127)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.build(EclipseSbtBuildManager.scala:85)
    at org.scalaide.core.internal.project.scopes.BuildScopeUnit.build(BuildScopeUnit.scala:73)
    at org.scalaide.core.internal.project.SbtScopesBuildManager$$anonfun$build$1.apply(SbtScopesBuildManager.scala:54)
    at org.scalaide.core.internal.project.SbtScopesBuildManager$$anonfun$build$1.apply(SbtScopesBuildManager.scala:51)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at org.scalaide.core.internal.project.SbtScopesBuildManager.build(SbtScopesBuildManager.scala:51)
    at org.scalaide.core.internal.project.ScalaProject.build(ScalaProject.scala:603)
    at org.scalaide.core.internal.builder.ScalaBuilder.build(ScalaBuilder.scala:109)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Scalac 2.11.8 NullPointerException crash in ScalacPatternExpander.applyMethodTypes

William Harvey
Thank you!

On Monday, December 5, 2016 at 3:24:41 AM UTC-5, som-snytt wrote:

<a href="https://issues.scala-lang.org/browse/SI-10090" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.scala-lang.org%2Fbrowse%2FSI-10090\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE17vdMbgMOW2fFY-c49DMe34zF-g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.scala-lang.org%2Fbrowse%2FSI-10090\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE17vdMbgMOW2fFY-c49DMe34zF-g&#39;;return true;">https://issues.scala-lang.org/browse/SI-10090

On Monday, December 5, 2016 at 12:10:30 AM UTC-8, som-snytt wrote:

Fewer parts:

Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.

scala> object X { implicit class Y(self: String) } // or object X { def Y(s: String): Int = 42 }
defined object X

scala> (null: Any) match { case X.Y.Z() => }
java.lang.NullPointerException
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$ScalacPatternExpander$class.applyMethodTypes(ScalacPatternExpanders.scala:65)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.applyMethodTypes(ScalacPatternExpanders.scala:97)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:136)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$ExtractorCall$.apply(MatchTranslation.scala:384)


or without parens a different crash:

scala> object X { implicit class Y(self: String) }
defined object X

scala> (null: Any) match { case X.Y.Z => }
java.lang.NullPointerException
    at scala.tools.nsc.ast.TreeInfo$ValueClass$$anonfun$valueUnbox$1.apply(TreeInfo.scala:45)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$$anonfun$valueUnbox$1.apply(TreeInfo.scala:45)
    at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$.valueUnbox(TreeInfo.scala:45)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$Unbox$.unapply(TreeInfo.scala:50)
    at scala.tools.nsc.ast.TreeInfo$ValueClass$BoxAndUnbox$.unapply(TreeInfo.scala:63)
    at scala.tools.nsc.transform.PostErasure$PostErasureTransformer.transform(PostErasure.scala:37)
    at scala.tools.nsc.transform.PostErasure$PostErasureTransformer.transform(PostErasure.scala:22)


failing the same way on 2.12.


On Friday, December 2, 2016 at 7:20:39 AM UTC-8, [hidden email] wrote:
Hi Everyone,

I am getting a 2.11.8 compiler crash that I think is related to some pattern matching.  Here is a self-contained example:

object Bug {
  sealed trait Bippy
  case class Bar() extends Bippy
  case class Baz() extends Bippy
 
  implicit class Naughty(self: String) {
  }
 
  val x: Bippy = ???
 
  x match {
    case Naughty.Bar() => ???
  }
}

The compiler meltdown happens when the match block is added.  The match is invalid and the compiler should reject it, but the crash is unexpected.  I think the feature interaction of implicit classes and pattern matching could be a starting point for investigation.

It looks like someone else may have stumbled on this too:  <a href="http://stackoverflow.com/questions/31007147/play-2-4-0-java-lang-nullpointerexception-on-all-http-requests" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F31007147%2Fplay-2-4-0-java-lang-nullpointerexception-on-all-http-requests\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpKRl0KIQ5XRKQMklIyglp8Lxu0g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F31007147%2Fplay-2-4-0-java-lang-nullpointerexception-on-all-http-requests\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEpKRl0KIQ5XRKQMklIyglp8Lxu0g&#39;;return true;">http://stackoverflow.com/questions/31007147/play-2-4-0-java-lang-nullpointerexception-on-all-http-requests

The stack trace is included at the end of this message (note: This comes from the Scala IDE, but I get the same thing when compiling in SBT).

Is this a known bug?  If not, should I report it?

Thanks!

William

java.lang.NullPointerException
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$ScalacPatternExpander$class.applyMethodTypes(ScalacPatternExpanders.scala:65)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.applyMethodTypes(ScalacPatternExpanders.scala:97)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:136)
    at scala.tools.nsc.transform.patmat.ScalacPatternExpanders$alignPatterns$.apply(ScalacPatternExpanders.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$ExtractorCall$.apply(MatchTranslation.scala:384)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractor$lzycompute(MatchTranslation.scala:71)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractor(MatchTranslation.scala:71)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.paramType$1(MatchTranslation.scala:113)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.extractorStep(MatchTranslation.scala:129)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.nextStep(MatchTranslation.scala:151)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$BoundTree.translate(MatchTranslation.scala:159)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translatePattern(MatchTranslation.scala:318)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translatePattern(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translateCase(MatchTranslation.scala:315)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translateCase(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$$anonfun$2.apply(MatchTranslation.scala:235)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$$anonfun$2.apply(MatchTranslation.scala:235)
    at scala.collection.immutable.List.map(List.scala:273)
    at scala.tools.nsc.transform.patmat.MatchTranslation$MatchTranslator$class.translateMatch(MatchTranslation.scala:235)
    at scala.tools.nsc.transform.patmat.PatternMatching$OptimizingMatchTranslator.translateMatch(PatternMatching.scala:89)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:62)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1378)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1347)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1370)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:62)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.internal.Trees$$anonfun$itransform$3.apply(Trees.scala:1379)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1378)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2559)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2559)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1347)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1363)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1361)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1360)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1404)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:40)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
    at scala.reflect.internal.Trees$$anonfun$itransform$5.apply(Trees.scala:1413)
    at scala.reflect.internal.Trees$$anonfun$itransform$5.apply(Trees.scala:1412)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1411)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:17)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1425)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:40)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:42)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:42)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
    at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:42)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:73)
    at scala.tools.nsc.transform.patmat.PatternMatching$MatchTransformer.transform(PatternMatching.scala:57)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:147)
    at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
    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.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
    at scala.collection.Iterator$class.foreach(Iterator.scala:893)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:398)
    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.Global$Run.compile(Global.scala:1582)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:51)
    at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:75)
    at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:50)
    at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:65)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
    at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:62)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:61)
    at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:89)
    at sbt.inc.Incremental$.compile(Incremental.scala:61)
    at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
    at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
    at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
    at org.scalaide.core.internal.builder.zinc.CachingCompiler.compile(CachingCompiler.scala:37)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.aggressiveCompile(EclipseSbtBuildManager.scala:213)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.runCompiler(EclipseSbtBuildManager.scala:145)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.update(EclipseSbtBuildManager.scala:127)
    at org.scalaide.core.internal.builder.zinc.EclipseSbtBuildManager.build(EclipseSbtBuildManager.scala:85)
    at org.scalaide.core.internal.project.scopes.BuildScopeUnit.build(BuildScopeUnit.scala:73)
    at org.scalaide.core.internal.project.SbtScopesBuildManager$$anonfun$build$1.apply(SbtScopesBuildManager.scala:54)
    at org.scalaide.core.internal.project.SbtScopesBuildManager$$anonfun$build$1.apply(SbtScopesBuildManager.scala:51)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at org.scalaide.core.internal.project.SbtScopesBuildManager.build(SbtScopesBuildManager.scala:51)
    at org.scalaide.core.internal.project.ScalaProject.build(ScalaProject.scala:603)
    at org.scalaide.core.internal.builder.ScalaBuilder.build(ScalaBuilder.scala:109)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.