JS backend: added @NotNull annotation to JsName's getIdent()
This commit is contained in:
committed by
Zalim Bashorov
parent
3b9232e8d4
commit
89d74d94c9
@@ -17,7 +17,7 @@ public class JsCatch extends SourceInfoAwareJsNode implements HasCondition {
|
|||||||
private JsExpression condition;
|
private JsExpression condition;
|
||||||
private JsParameter param;
|
private JsParameter param;
|
||||||
|
|
||||||
public JsCatch(JsScope parent, String ident) {
|
public JsCatch(JsScope parent, @NotNull String ident) {
|
||||||
super();
|
super();
|
||||||
assert (parent != null);
|
assert (parent != null);
|
||||||
scope = new JsCatchScope(parent, ident);
|
scope = new JsCatchScope(parent, ident);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class JsCatchScope extends JsScope {
|
public class JsCatchScope extends JsScope {
|
||||||
private final JsName name;
|
private final JsName name;
|
||||||
|
|
||||||
public JsCatchScope(JsScope parent, String ident) {
|
public JsCatchScope(JsScope parent, @NotNull String ident) {
|
||||||
super(parent, "Catch scope", null);
|
super(parent, "Catch scope", null);
|
||||||
name = new JsName(this, ident);
|
name = new JsName(this, ident);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,16 +13,19 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
public class JsName extends HasMetadata implements Symbol {
|
public class JsName extends HasMetadata implements Symbol {
|
||||||
private final JsScope enclosing;
|
private final JsScope enclosing;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
private final String ident;
|
private final String ident;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ident the unmangled ident to use for this name
|
* @param ident the unmangled ident to use for this name
|
||||||
*/
|
*/
|
||||||
JsName(JsScope enclosing, String ident) {
|
JsName(JsScope enclosing, @NotNull String ident) {
|
||||||
this.enclosing = enclosing;
|
this.enclosing = enclosing;
|
||||||
this.ident = ident;
|
this.ident = ident;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
public String getIdent() {
|
public String getIdent() {
|
||||||
return ident;
|
return ident;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public abstract class JsScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
protected JsName doCreateName(String ident) {
|
protected JsName doCreateName(@NotNull String ident) {
|
||||||
JsName name = new JsName(this, ident);
|
JsName name = new JsName(this, ident);
|
||||||
names = Maps.put(names, ident, name);
|
names = Maps.put(names, ident, name);
|
||||||
return name;
|
return name;
|
||||||
|
|||||||
Reference in New Issue
Block a user