Skip to content

Commit 7c6b6c1

Browse files
committed
better return types in SliceLiteralNode (also works around GR-28840)
1 parent e48f1b1 commit 7c6b6c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/subscript/SliceLiteralNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ public PSlice doInt(PNone start, int stop, int step) {
9898

9999
@Specialization(guards = {"isNoValue(second)", "isNoValue(third)"})
100100
@SuppressWarnings("unused")
101-
public Object sliceStop(int first, PNone second, PNone third) {
101+
public PSlice sliceStop(int first, PNone second, PNone third) {
102102
return factory.createIntSlice(0, first, 1, true, true);
103103
}
104104

105105
@Specialization(guards = {"!isNoValue(stop)", "!isNoValue(step)"})
106-
public Object doGeneric(Object start, Object stop, Object step) {
106+
public PSlice doGeneric(Object start, Object stop, Object step) {
107107
return factory.createObjectSlice(start, stop, step);
108108
}
109109

0 commit comments

Comments
 (0)