Skip to content

Commit

Permalink
Fix ConsoleInterface binding things properly.
Browse files Browse the repository at this point in the history
In reference to sbt/sbt#2884 I'm seeing the
console helpers (cpHelpers) being statically 'Object', and therefore not
being that helpful:

    scala> cpHelpers
    res0: Object = sbt.internal.ConsoleProject$Imports@610be000

    scala> cpHelpers.taskKeyEvaluate
    <console>:37: error: value taskKeyEvaluate is not a member of Object
           cpHelpers.taskKeyEvaluate
                     ^

    scala> cpHelpers.asInstanceOf[sbt.internal.ConsoleProject.Imports].taskKeyEvaluate _
    res3: sbt.TaskKey[Nothing] => sbt.internal.ConsoleProject.Evaluate[Nothing] = $$Lambda$4294/1575143649@5a54d62c

This is because I misinterpreted the Scala 2.8 compatibility layer I
tore out in 1abf6ca.
  • Loading branch information
dwijnand committed Jun 9, 2017
1 parent 2458d14 commit 0e4bb2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ConsoleInterface {
super.createInterpreter()

for ((id, value) <- bindNames zip bindValues)
intp.beQuietDuring(intp.bind(id, value))
intp.beQuietDuring(intp.bind(id, value.asInstanceOf[AnyRef].getClass.getName, value))

if (!initialCommands.isEmpty)
intp.interpret(initialCommands)
Expand Down

0 comments on commit 0e4bb2c

Please sign in to comment.