Allow test invocations like Kotlin.isType or Kotlin.throwCCE with CHECK_NOT_CALLED_IN_SCOPE directive.

This commit is contained in:
Ilya Gorbunov
2016-12-24 02:25:53 +03:00
parent c4f731b987
commit 72e461e2d5
@@ -81,8 +81,8 @@ public class CallCounter extends RecursiveJsVisitor {
int count = 0; int count = 0;
for (JsNameRef callNameRef : callsNameRefs) { for (JsNameRef callNameRef : callsNameRefs) {
JsName name = callNameRef.getName(); String name = callNameRef.getIdent();
if (name != null && name.getIdent().equals(expectedName)) { if (name.equals(expectedName)) {
count++; count++;
} }
} }
@@ -134,8 +134,8 @@ public class CallCounter extends RecursiveJsVisitor {
} }
JsNameRef currentNameRef = (JsNameRef) currentQualifier; JsNameRef currentNameRef = (JsNameRef) currentQualifier;
JsName name = currentNameRef.getName(); String name = currentNameRef.getIdent();
if (name == null || !name.getIdent().equals(expectedQualifier)) { if (!name.equals(expectedQualifier)) {
return false; return false;
} }