Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/TemplateMethodParser.java @ 7753:c17ee8823d72
Fixed bug in method parsing error messages.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Feb 2013 10:40:52 +0100 |
parents | 5f3cba05c2fa |
children | 6b74ffe38183 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/TemplateMethodParser.java Fri Feb 08 16:23:11 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/TemplateMethodParser.java Mon Feb 11 10:40:52 2013 +0100 @@ -233,10 +233,9 @@ return new ActualParameter(specification, resolvedType); } - protected static List<TypeDef> createTypeDefinitions(ParameterSpec returnType, List<? extends ParameterSpec> parameters) { + protected List<TypeDef> createTypeDefinitions(ParameterSpec returnType, List<? extends ParameterSpec> parameters) { List<TypeDef> typeDefs = new ArrayList<>(); - TypeMirror[] types = returnType.getAllowedTypes(); List<ParameterSpec> allParams = new ArrayList<>(); allParams.add(returnType); allParams.addAll(parameters); @@ -244,10 +243,11 @@ int defIndex = 0; for (ParameterSpec spec : allParams) { TypeMirror[] allowedTypes = spec.getAllowedTypes(); + TypeMirror[] types = spec.getAllowedTypes(); if (types != null && allowedTypes.length > 1) { TypeDef foundDef = null; for (TypeDef def : typeDefs) { - if (Arrays.equals(spec.getAllowedTypes(), def.getTypes())) { + if (Arrays.equals(allowedTypes, def.getTypes())) { foundDef = def; break; }