let consider following snippet
set 'window -> preferences -> scala -> debug -> expression evaluator -> add imports from current file' to false (uncheck it)
and stop in breakpoint in line with comment 'BREAKPOINT HERE'
then in Expression Evaluator view evaluate
then you experience an error: "scala.reflect.runtime.ReflectError: object SomeTestClass is not a package".
The problem is in the way how inner import is constructed:
we see:
and probably expect:
package goo
package inner
class SomeTestClass {
def foo(silent: Boolean) = {
(new Inner1).inner.foo()
}
private class Inner1 {
def inner = Inner
object Inner {
def foo(silent: Boolean = false): String =
"trala".nonEmpty.toString() // <- BREAKPOINT HERE
}
}
}
set 'window -> preferences -> scala -> debug -> expression evaluator -> add imports from current file' to false (uncheck it)
and stop in breakpoint in line with comment 'BREAKPOINT HERE'
then in Expression Evaluator view evaluate
val a = 5
then you experience an error: "scala.reflect.runtime.ReflectError: object SomeTestClass is not a package".
The problem is in the way how inner import is constructed:
{
import goo.inner._;
import org.scalaide.debug.internal.expression.context._;
import org.scalaide.debug.internal.expression.proxies._;
import org.scalaide.debug.internal.expression.proxies.primitives._;
{
val __this: goo.inner.SomeTestClass.Inner1.Inner.type = JdiContext.placeholder;
import __this._;
{
val a = 5;
()
}
}
}
we see:
val __this: goo.inner.SomeTestClass.Inner1.Inner.type = JdiContext.placeholder;
and probably expect:
val __this: goo.inner.SomeTestClass#Inner1#Inner.type = JdiContext.placeholder;
Leave a comment
on 2015-11-02 11:11 *
By Simon Schäfer
Summary changed from Expression Evaluator cannot create imports properly to Expression Evaluator cannot use type projections when they are needed
Move ticket to next milestone.
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|