Skip to content

Commit 520a2bb

Browse files
committed
Widen SA type as well
1 parent 46d9b4f commit 520a2bb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/laytonsmith/core/functions/ArrayHandling.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public Mixed exec(Target t, Environment env, Mixed... args) throws ConfigRuntime
296296
public CClassType getReturnType(Target t, List<CClassType> argTypes, List<Target> argTargets,
297297
Environment env, Set<ConfigCompileException> exceptions) {
298298
if(argTypes.size() == 2 || argTypes.size() == 3) {
299-
StaticAnalysis.requireType(argTypes.get(0), ArrayAccess.TYPE, argTargets.get(0), env, exceptions);
299+
StaticAnalysis.requireType(argTypes.get(0), com.laytonsmith.core.natives.interfaces.Iterable.TYPE, argTargets.get(0), env, exceptions);
300300
StaticAnalysis.requireAnyType(argTypes.get(1),
301301
new CClassType[] {CInt.TYPE, CSlice.TYPE, CString.TYPE}, argTargets.get(1), env, exceptions);
302302
if(argTypes.size() == 3) {

src/main/java/com/laytonsmith/core/natives/interfaces/ArrayAccess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public interface ArrayAccess extends Booleanish {
8787
* int start = Math.min(begin, end);
8888
* int stop = Math.max(begin, end);
8989
* int step = (begin &lt;= end) ? 1 : -1;
90-
* for (int i = start; i != stop; i += step) { ... }
90+
* for(int i = start; i != stop; i += step) { ... }
9191
* </code></pre>
9292
*
9393
* @param begin

0 commit comments

Comments
 (0)