Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix npe

  • Loading branch information...
commit 9e19885ce763aa7b853e93d99d73283272ef949a 1 parent e4ead60
Gavin King gavinking authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/com/redhat/ceylon/compiler/typechecker/model/Util.java
13 src/com/redhat/ceylon/compiler/typechecker/model/Util.java
View
@@ -137,21 +137,22 @@ else if (signature.size()!=size) {
//ignore optionality for resolving overloads, since
//all Java method params are treated as optional
ProducedType pdt = params.get(i).getType();
+ if (pdt==null) return false;
ProducedType sdt = signature.get(i);
if (!matches(pdt, sdt, d)) return false;
}
if (hasSeqParam) {
ProducedType pdt = params.get(size).getType();
- if(ellipsis){
+ if (pdt==null) return false;
+ if (ellipsis){
// we must have exactly one spread param
- if(signature.size() > size+1)
- return false;
+ if (signature.size() > size+1) return false;
ProducedType sdt = signature.get(size);
ProducedType isdt = d.getUnit().getIteratedType(sdt);
ProducedType ipdt = d.getUnit().getIteratedType(pdt);
- if(!matches(ipdt, isdt, d))
- return false;
- }else{
+ if (!matches(ipdt, isdt, d)) return false;
+ }
+ else {
pdt = d.getUnit().getIteratedType(pdt);
for (int j=size; j<signature.size(); j++) {
ProducedType sdt = signature.get(j);
Please sign in to comment.
Something went wrong with that request. Please try again.