Fix EA-63657

This commit is contained in:
Natalia Ukhorskaya
2015-06-02 13:05:34 +03:00
parent c410f1cdfc
commit 094119ee63
@@ -96,6 +96,10 @@ object KotlinEvaluationBuilder: EvaluatorBuilder {
throw EvaluateExceptionUtil.createEvaluateException("Couldn't evaluate kotlin expression in non-kotlin context")
}
if (position.getLine() < 0) {
throw EvaluateExceptionUtil.createEvaluateException("Couldn't evaluate kotlin expression at $position")
}
if (codeFragment.getContext() !is JetElement) {
val attachments = arrayOf(attachmentByPsiFile(position.getFile()),
attachmentByPsiFile(codeFragment),