You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/grammar/TestParserTranslator.java
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,6 @@
105
105
importcom.oracle.truffle.api.nodes.NodeUtil;
106
106
importcom.oracle.truffle.api.source.Source;
107
107
108
-
@SuppressWarnings({"unchecked"})
109
108
publicclassTestParserTranslator {
110
109
PythonContextcontext;
111
110
@@ -132,7 +131,7 @@ <T> T getChild(Node result, int num, Class<? extends T> klass) {
132
131
continue;
133
132
}
134
133
assertTrue("Expected an instance of " + klass + ", got " + n.getClass(), klass.isInstance(n));
135
-
return(T) n;
134
+
returnklass.cast(n);
136
135
}
137
136
assertFalse("Expected an instance of " + klass + ", got null", true);
0 commit comments