ThoughtWorksInc / each

A macro library that converts native imperative syntax to scalaz's monadic expressions
Apache License 2.0
256 stars 25 forks source link

Error:scalac: unexpected UnApply collection.this.Seq.unapplySeq[Int] #42

Open emcastro opened 8 years ago

emcastro commented 8 years ago

The following code does not compile, due to the use of matching on sequence:

object Test extends App {

  import scalaz.std.list._
  import com.thoughtworks.each.Monadic._

  val x = monadic[List] {
    val a = List(Seq(1),Seq(1,2)).each
    a match {
      case Seq(x) => (x)
      case Seq(x,y) => (y)
    }
  }

  x.foreach(println)

}

It produces:

Error:scalac: unexpected UnApply collection.this.Seq.unapplySeq[Int](<unapply-selector>) <unapply> ((x @ _))
Error:scalac: Error: unexpected UnApply collection.this.Seq.unapplySeq[Int](<unapply-selector>) <unapply> ((x @ _))
scala.reflect.internal.FatalError: unexpected UnApply collection.this.Seq.unapplySeq[Int](<unapply-selector>) <unapply> ((x @ _))
    at scala.reflect.internal.Reporting$class.abort(Reporting.scala:59)
    at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:16)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5348)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    ...

(full stacktrace below)

When replacing Seq with tuples, it does work:

object TestTest extends App {

  import scalaz.std.list._
  import com.thoughtworks.each.Monadic._

  val x = monadic[List] {
    val a = List((1,2),(3,4)).each
    a match {
      case (1,x) => (x)
      case (3,y) => (y)
    }
  }

  x.foreach(println)

}

Full error stacktrace:

Error:scalac: unexpected UnApply collection.this.Seq.unapplySeq[Int](<unapply-selector>) <unapply> ((x @ _))
Error:scalac: Error: unexpected UnApply collection.this.Seq.unapplySeq[Int](<unapply-selector>) <unapply> ((x @ _))
scala.reflect.internal.FatalError: unexpected UnApply collection.this.Seq.unapplySeq[Int](<unapply-selector>) <unapply> ((x @ _))
    at scala.reflect.internal.Reporting$class.abort(Reporting.scala:59)
    at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:16)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5348)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$121$$anonfun$apply$55.apply(Typers.scala:5509)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$121.apply(Typers.scala:5509)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$121.apply(Typers.scala:5509)
    at scala.tools.nsc.typechecker.TypeDiagnostics$class.typingInPattern(TypeDiagnostics.scala:62)
    at scala.tools.nsc.Global$$anon$1.typingInPattern(Global.scala:462)
    at scala.tools.nsc.typechecker.Typers$Typer.typedPattern(Typers.scala:5509)
    at scala.tools.nsc.typechecker.Typers$Typer.typedCase(Typers.scala:2400)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedCases$1.apply(Typers.scala:2440)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedCases$1.apply(Typers.scala:2439)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.tools.nsc.typechecker.Typers$Typer.typedCases(Typers.scala:2439)
    at scala.tools.nsc.typechecker.Typers$Typer.typedMatch(Typers.scala:2451)
    at scala.tools.nsc.typechecker.Typers$Typer.typedVirtualizedMatch$1(Typers.scala:4311)
    at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5322)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5463)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedFunction(Typers.scala:2988)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedFunction$1$1.apply(Typers.scala:5284)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedFunction$1$1.apply(Typers.scala:5284)
    at scala.tools.nsc.typechecker.Typers$Typer.typedFunction$1(Typers.scala:5284)
    at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5321)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:3164)
    at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$class.typedArgWithFormal$1(PatternTypers.scala:112)
    at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$$anonfun$2.apply(PatternTypers.scala:115)
    at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$$anonfun$2.apply(PatternTypers.scala:115)
    at scala.runtime.Tuple2Zipped$$anonfun$map$extension$1.apply(Tuple2Zipped.scala:46)
    at scala.runtime.Tuple2Zipped$$anonfun$map$extension$1.apply(Tuple2Zipped.scala:44)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at scala.runtime.Tuple2Zipped$.map$extension(Tuple2Zipped.scala:44)
    at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$class.typedArgsForFormals(PatternTypers.scala:115)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArgsForFormals(Typers.scala:111)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$handleMonomorphicCall$1(Typers.scala:3470)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3495)
    at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4546)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4580)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5343)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2382)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5318)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5318)
    at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5317)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5463)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedFunction(Typers.scala:2988)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedFunction$1$1.apply(Typers.scala:5284)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedFunction$1$1.apply(Typers.scala:5284)
    at scala.tools.nsc.typechecker.Typers$Typer.typedFunction$1(Typers.scala:5284)
    at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5321)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:3164)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedArgToPoly$1(Typers.scala:3515)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$75.apply(Typers.scala:3523)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$75.apply(Typers.scala:3523)
    at scala.reflect.internal.util.Collections$class.map2(Collections.scala:79)
    at scala.reflect.internal.SymbolTable.map2(SymbolTable.scala:16)
    at scala.tools.nsc.typechecker.Typers$Typer.handlePolymorphicCall$1(Typers.scala:3523)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3534)
    at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4546)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4580)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5343)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2382)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5318)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5318)
    at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5317)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Macros$DefMacroExpander.typecheck$1(Macros.scala:635)
    at scala.tools.nsc.typechecker.Macros$DefMacroExpander.onSuccess(Macros.scala:647)
    at scala.tools.nsc.typechecker.Macros$MacroExpander$$anonfun$expand$1.apply(Macros.scala:586)
    at scala.tools.nsc.typechecker.Macros$MacroExpander$$anonfun$expand$1.apply(Macros.scala:573)
    at scala.tools.nsc.Global.withInfoLevel(Global.scala:211)
    at scala.tools.nsc.typechecker.Macros$MacroExpander.expand(Macros.scala:572)
    at scala.tools.nsc.typechecker.Macros$MacroExpander.apply(Macros.scala:560)
    at scala.tools.nsc.typechecker.Macros$class.standardMacroExpand(Macros.scala:724)
    at scala.tools.nsc.Global$$anon$1.standardMacroExpand(Global.scala:462)
    at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:400)
    at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:397)
    at scala.tools.nsc.typechecker.AnalyzerPlugins$class.invoke(AnalyzerPlugins.scala:369)
    at scala.tools.nsc.typechecker.AnalyzerPlugins$class.pluginsMacroExpand(AnalyzerPlugins.scala:397)
    at scala.tools.nsc.Global$$anon$1.pluginsMacroExpand(Global.scala:462)
    at scala.tools.nsc.typechecker.Macros$class.macroExpand(Macros.scala:717)
    at scala.tools.nsc.Global$$anon$1.macroExpand(Global.scala:462)
    at scala.tools.nsc.typechecker.Typers$Typer.vanillaAdapt$1(Typers.scala:1111)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1166)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5410)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.adaptToImplicitMethod$1(Typers.scala:823)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1162)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5410)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5463)
    at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:5554)
    at scala.tools.nsc.typechecker.Namers$Namer.assignTypeToTree(Namers.scala:880)
    at scala.tools.nsc.typechecker.Namers$Namer.valDefSig(Namers.scala:1382)
    at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1533)
    at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1542)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:782)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:781)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:781)
    at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1569)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:781)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:773)
    at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1685)
    at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1693)
    at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1683)
    at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1514)
    at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1659)
    at scala.tools.nsc.typechecker.MethodSynthesis$MethodSynth$class.addDerivedTrees(MethodSynthesis.scala:182)
    at scala.tools.nsc.typechecker.Namers$Namer.addDerivedTrees(Namers.scala:54)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$25.apply(Typers.scala:1908)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$25.apply(Typers.scala:1908)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1845)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1842)
    at scala.collection.immutable.List.flatMap(List.scala:327)
    at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1908)
    at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1808)
    at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5310)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5452)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3047)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3151)
    at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5015)
    at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5312)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5448)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:440)
    at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:431)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:440)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:94)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:93)
    at scala.collection.Iterator$class.foreach(Iterator.scala:893)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1501)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1486)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1481)
    at scala.tools.nsc.Global$Run.compile(Global.scala:1582)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:115)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:94)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:22)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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 org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29)
    at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
    at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:67)
    at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:24)
    at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
emcastro commented 8 years ago

The problems occurs in Scala 2.11.8 There is no problem in Scala 2.10.6

Atry commented 8 years ago

Looks like a bug in Scala compiler. It may be related to https://issues.scala-lang.org/browse/SI-8825