JS backend: Minor changes -- added @NotNull to some methods of InnerDeclarationTranslator.
This commit is contained in:
+3
@@ -39,6 +39,7 @@ abstract class InnerDeclarationTranslator {
|
||||
this.fun = fun;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public JsExpression translate(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||
UsageTracker usageTracker = context.usageTracker();
|
||||
assert usageTracker != null : "Usage tracker should not be null for InnerDeclarationTranslator";
|
||||
@@ -72,7 +73,9 @@ abstract class InnerDeclarationTranslator {
|
||||
return invocation;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected abstract JsExpression createExpression(@NotNull JsNameRef nameRef, @Nullable JsExpression self);
|
||||
|
||||
@NotNull
|
||||
protected abstract JsInvocation createInvocation(@NotNull JsNameRef nameRef, @Nullable JsExpression self);
|
||||
}
|
||||
|
||||
+2
@@ -43,11 +43,13 @@ class InnerFunctionTranslator extends InnerDeclarationTranslator {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
protected JsExpression createExpression(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||
return nameRef;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
protected JsInvocation createInvocation(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||
return new JsInvocation(new JsNameRef("bind", nameRef), new SmartList<JsExpression>(self));
|
||||
}
|
||||
|
||||
+2
@@ -30,11 +30,13 @@ class InnerObjectTranslator extends InnerDeclarationTranslator {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
protected JsExpression createExpression(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||
return createInvocation(nameRef, self);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
protected JsInvocation createInvocation(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||
JsInvocation invocation = new JsInvocation(nameRef);
|
||||
if (self != null) {
|
||||
|
||||
Reference in New Issue
Block a user