Scala Programming Language
  1. Scala Programming Language
  2. SI-5231

TypeChecker AssertionError with private constructor access

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.1
    • Fix Version/s: None
    • Component/s: Type Checker
    • Labels:
      None

      Description

      The following crashes:

      object Client {
         sealed trait ConfigLike {
            def clientID:     Int
         }
      
         object Config {
            def apply() : ConfigBuilder = new ConfigBuilder()
            implicit def build( cb: ConfigBuilder ) : Config = cb.build
         }
      
         final class Config private[Client]( val clientID: Int )
         extends ConfigLike
      
         final class ConfigBuilder private () extends ConfigLike {
            var clientID: Int = 0
            def build : Config = new Config( clientID )
         }
      }
      

      The crash is as follows:

      java.lang.AssertionError: assertion failed: Config.this.build(new Client.this.ConfigBuilder)
      	at scala.tools.nsc.typechecker.NamesDefaults$class.baseFunBlock$1(NamesDefaults.scala:228)
      	at scala.tools.nsc.typechecker.NamesDefaults$class.transformNamedApplication(NamesDefaults.scala:337)
      	at scala.tools.nsc.Global$analyzer$.transformNamedApplication(Global.scala:351)
      	at scala.tools.nsc.typechecker.Typers$Typer.tryNamesDefaults$1(Typers.scala:2373)
      	at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2411)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3371)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4104)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:4428)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1760)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3919)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1320)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3913)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
      	at scala.collection.immutable.List.loop$1(List.scala:117)
      	at scala.collection.immutable.List.mapConserve(List.scala:133)
      	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3906)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
      	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4331)
      	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:94)
      	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
      	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:86)
      	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:86)
      	at scala.collection.Iterator$class.foreach(Iterator.scala:660)
      	at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:316)
      	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:86)
      	at scala.tools.nsc.Global$Run.compileSources(Global.scala:953)
      	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:756)
      	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:731)
      	at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:873)
      	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:576)
      	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:543)
      	at de.sciss.scalainterpreter.ScalaInterpreterPane$$anonfun$interpret$1.apply(ScalaInterpreterPane.scala:211)
      	at de.sciss.scalainterpreter.ScalaInterpreterPane$$anonfun$interpret$1.apply(ScalaInterpreterPane.scala:209)
      	at scala.Option.foreach(Option.scala:197)
      	at de.sciss.scalainterpreter.ScalaInterpreterPane.interpret(ScalaInterpreterPane.scala:209)
      	at de.sciss.scalainterpreter.ScalaInterpreterPane$$anon$3$$anonfun$actionPerformed$1.apply(ScalaInterpreterPane.scala:160)
      	at de.sciss.scalainterpreter.ScalaInterpreterPane$$anon$3$$anonfun$actionPerformed$1.apply(ScalaInterpreterPane.scala:160)
      	at scala.Option.foreach(Option.scala:197)
      	at de.sciss.scalainterpreter.ScalaInterpreterPane$$anon$3.actionPerformed(ScalaInterpreterPane.scala:160)
      	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1639)
      	at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
      	at javax.swing.JComponent.processKeyBindings(JComponent.java:2886)
      	at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
      	at de.sciss.scalainterpreter.ScalaInterpreterPane$$anon$1.processKeyEvent(ScalaInterpreterPane.scala:87)
      	at java.awt.Component.processEvent(Component.java:6125)
      	at java.awt.Container.processEvent(Container.java:2085)
      	at java.awt.Component.dispatchEventImpl(Component.java:4714)
      	at java.awt.Container.dispatchEventImpl(Container.java:2143)
      	at java.awt.Component.dispatchEvent(Component.java:4544)
      	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850)
      	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712)
      	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990)
      	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855)
      	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676)
      	at java.awt.Component.dispatchEventImpl(Component.java:4586)
      	at java.awt.Container.dispatchEventImpl(Container.java:2143)
      	at java.awt.Window.dispatchEventImpl(Window.java:2478)
      	at java.awt.Component.dispatchEvent(Component.java:4544)
      	at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
      	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
      	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
      	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
      	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      

      The actual mistake is that the private constructor of `ConfigBuilder` cannot be invoked, the corrected code would be

          final class ConfigBuilder private[Client] () extends ConfigLike ...
      

        Issue Links

          Activity

          Hide
          Lukas Rytz added a comment -

          minimized below - but see SI-6074

          object T {
            def m = new ConfigBuilder()
            implicit def build( cb: ConfigBuilder ) : Config = null
          }
          
          class Config(x: Int)
          
          class ConfigBuilder private ()  { }
          
          Show
          Lukas Rytz added a comment - minimized below - but see SI-6074 object T { def m = new ConfigBuilder() implicit def build( cb: ConfigBuilder ) : Config = null } class Config(x: Int) class ConfigBuilder private () { }
          Hide
          Lukas Rytz added a comment -
          Show
          Lukas Rytz added a comment - fixed in https://github.com/scala/scala/pull/1051

            People

            • Assignee:
              Lukas Rytz
              Reporter:
              Sciss
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development