diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/type/GroovyTypeCheckVisitorHelper.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/type/GroovyTypeCheckVisitorHelper.java index b6d4f27fd533..4b31efe39643 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/type/GroovyTypeCheckVisitorHelper.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/type/GroovyTypeCheckVisitorHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -191,7 +191,9 @@ public class GroovyTypeCheckVisitorHelper { final ArrayList fixes = new ArrayList(); for (Pair error : allErrors) { - fixes.add(new ParameterCastFix(error.first, error.second, args.get(error.first))); + if (args.size() > error.first) { + fixes.add(new ParameterCastFix(error.first, error.second, args.get(error.first))); + } } return fixes.toArray(new LocalQuickFix[fixes.size()]); }