File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ public void setSymbol(int symbol) {
71
71
}
72
72
73
73
@ Override
74
- public boolean isValidExpression () {
75
- return object instanceof ITypeExpression || object instanceof DynamicImport ;
74
+ public boolean isValidTypeExpression () {
75
+ return object instanceof ITypeExpression && (( ITypeExpression ) object ). isValidTypeExpression () || object instanceof DynamicImport ;
76
76
}
77
77
}
Original file line number Diff line number Diff line change 11
11
* TypeScript AST does not distinguish <code>null</code> literals from the <code>null</code> type.
12
12
*/
13
13
public interface ITypeExpression extends INode , ITypedAstNode {
14
- public default boolean isValidExpression () { return true ; }
14
+ public default boolean isValidTypeExpression () { return true ; }
15
15
}
Original file line number Diff line number Diff line change @@ -1907,7 +1907,7 @@ private Node convertOptionalType(JsonObject node, SourceLocation loc) throws Par
1907
1907
}
1908
1908
1909
1909
private ITypeExpression asType (Node node ) {
1910
- return node instanceof ITypeExpression && ((ITypeExpression )node ).isValidExpression () ? (ITypeExpression ) node : null ;
1910
+ return node instanceof ITypeExpression && ((ITypeExpression )node ).isValidTypeExpression () ? (ITypeExpression ) node : null ;
1911
1911
}
1912
1912
1913
1913
private List <ITypeExpression > convertChildrenAsTypes (JsonObject node , String child )
You can’t perform that action at this time.
0 commit comments