incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daw...@apache.org
Subject svn commit: r945356 - /incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java
Date Mon, 17 May 2010 20:37:45 GMT
Author: dawood
Date: Mon May 17 20:37:45 2010
New Revision: 945356

URL: http://svn.apache.org/viewvc?rev=945356&view=rev
Log:
Add code to validateActualParameters() to handle parameters that are of type TypeInfo.INVALID.

Modified:
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java?rev=945356&r1=945355&r2=945356&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/statements/actions/impl/AnchorMethodInvokeAction.java
Mon May 17 20:37:45 2010
@@ -243,9 +243,18 @@ public class AnchorMethodInvokeAction im
             {
                 Argument formalArg = (Argument) formalParamTypeIt.next();
                 Expression actualParam = (Expression) actualParamIt.next();
+                TypeInfo actualType = actualParam.getType();
+                if (actualType.getType() == TypeConstants.INVALID && 
+                	actualParam instanceof PrimaryExpression) {
+                	PrimaryExpression pexp = (PrimaryExpression)actualParam;
+                	String className = symTab.getClassNameOfInstance(pexp.getclassNameOrInstanceVariableName());
+                	actualType = new TypeInfoImpl();
+                	actualType.setType(TypeConstants.referenceType);
+                	actualType.setReferenceTypeName(className);
+                }
                 
-                if (!TypeResolver.isTypeAssignableForEquality(formalArg
-                        .getType(), actualParam.getType())) 
+                if (!TypeResolver.isTypeAssignableForEquality(formalArg.getType(), 
+                		actualType)) 
                 {
                     throw new SPLException(
 							Messages
@@ -559,7 +568,7 @@ public class AnchorMethodInvokeAction im
 //                    	
                     	Argument arg = new ArgumentImpl(exp.getType().getType(),
 //	                            null, exp.isArray(), null);
-	                            null, flag, null);
+	                            null, flag, exp.getType().getReferenceTypeName());
 	                    arg.setValue(result);
 	                    parameterObjects.add(arg);
                     }



Mime
View raw message