mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
use Identifier instead of just a plain string when getting tuple-element-names
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.semmle.ts.ast;
|
||||
|
||||
import com.semmle.js.ast.Identifier;
|
||||
import com.semmle.js.ast.SourceLocation;
|
||||
import com.semmle.js.ast.Visitor;
|
||||
import java.util.List;
|
||||
@@ -7,9 +8,9 @@ import java.util.List;
|
||||
/** A tuple type, such as <tt>[number, string]</tt>. */
|
||||
public class TupleTypeExpr extends TypeExpression {
|
||||
private final List<ITypeExpression> elementTypes;
|
||||
private final List<String> elementNames;
|
||||
private final List<Identifier> elementNames;
|
||||
|
||||
public TupleTypeExpr(SourceLocation loc, List<ITypeExpression> elementTypes, List<String> elementNames) {
|
||||
public TupleTypeExpr(SourceLocation loc, List<ITypeExpression> elementTypes, List<Identifier> elementNames) {
|
||||
super("TupleTypeExpr", loc);
|
||||
this.elementTypes = elementTypes;
|
||||
this.elementNames = elementNames;
|
||||
@@ -19,7 +20,7 @@ public class TupleTypeExpr extends TypeExpression {
|
||||
return elementTypes;
|
||||
}
|
||||
|
||||
public List<String> getElementNames() {
|
||||
public List<Identifier> getElementNames() {
|
||||
return elementNames;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user