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) {
7171 }
7272
7373 @ 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 ;
7676 }
7777}
Original file line number Diff line number Diff line change 1111 * TypeScript AST does not distinguish <code>null</code> literals from the <code>null</code> type.
1212 */
1313public interface ITypeExpression extends INode , ITypedAstNode {
14- public default boolean isValidExpression () { return true ; }
14+ public default boolean isValidTypeExpression () { return true ; }
1515}
Original file line number Diff line number Diff line change @@ -1907,7 +1907,7 @@ private Node convertOptionalType(JsonObject node, SourceLocation loc) throws Par
19071907 }
19081908
19091909 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 ;
19111911 }
19121912
19131913 private List <ITypeExpression > convertChildrenAsTypes (JsonObject node , String child )
You can’t perform that action at this time.
0 commit comments