From b5b5305456df530c454205b4e32d23ddda2de5b9 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Tue, 25 Aug 2015 20:43:55 +0300 Subject: [PATCH] Diagnostics for Rewrite at slice RESOLUTION_SCOPE key: REFERENCE_EXPRESSION (EA-64051) --- .../src/org/jetbrains/kotlin/util/slicedMap/Slices.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/util/slicedMap/Slices.java b/compiler/frontend/src/org/jetbrains/kotlin/util/slicedMap/Slices.java index edc68fcccda..32dee8adc6c 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/util/slicedMap/Slices.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/util/slicedMap/Slices.java @@ -18,6 +18,8 @@ package org.jetbrains.kotlin.util.slicedMap; import com.intellij.openapi.diagnostic.Logger; import org.jetbrains.annotations.NotNull; +import org.jetbrains.kotlin.psi.JetElement; +import org.jetbrains.kotlin.psi.psiUtil.PsiUtilPackage; import java.util.Arrays; import java.util.List; @@ -38,7 +40,8 @@ public class Slices { LOG.error("Rewrite at slice " + slice + " key: " + key + " old value: " + oldValue + '@' + System.identityHashCode(oldValue) + - " new value: " + newValue + '@' + System.identityHashCode(newValue)); + " new value: " + newValue + '@' + System.identityHashCode(newValue) + + (key instanceof JetElement ? "\n" + PsiUtilPackage.getElementTextWithContext((JetElement) key) : "")); } return true; }