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 JsParameter param;
|
||||
|
||||
public JsCatch(JsScope parent, String ident) {
|
||||
public JsCatch(JsScope parent, @NotNull String ident) {
|
||||
super();
|
||||
assert (parent != null);
|
||||
scope = new JsCatchScope(parent, ident);
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class JsCatchScope extends JsScope {
|
||||
private final JsName name;
|
||||
|
||||
public JsCatchScope(JsScope parent, String ident) {
|
||||
public JsCatchScope(JsScope parent, @NotNull String ident) {
|
||||
super(parent, "Catch scope", null);
|
||||
name = new JsName(this, ident);
|
||||
}
|
||||
|
||||
@@ -13,16 +13,19 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class JsName extends HasMetadata implements Symbol {
|
||||
private final JsScope enclosing;
|
||||
|
||||
@NotNull
|
||||
private final String ident;
|
||||
|
||||
/**
|
||||
* @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.ident = ident;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getIdent() {
|
||||
return ident;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ public abstract class JsScope {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected JsName doCreateName(String ident) {
|
||||
protected JsName doCreateName(@NotNull String ident) {
|
||||
JsName name = new JsName(this, ident);
|
||||
names = Maps.put(names, ident, name);
|
||||
return name;
|
||||
|
||||
Reference in New Issue
Block a user