Skip to content

Commit

Permalink
Fix convert long to int for teavm
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Aug 14, 2024
1 parent 5cf9196 commit 8103a8a
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -751,17 +751,19 @@ private MethodDeclaration getNativeMethod(ClassOrInterfaceDeclaration classDecla
if(arguments.size() > 0) {
for(int i = 0; i < arguments.size(); i++) {
Expression expression = arguments.get(i);
if(expression.isMethodCallExpr() || expression.isEnclosedExpr()) {
paramTypes.add("long");
continue;
}
else if(expression.isLambdaExpr()) {
continue;
}
ResolvedType resolvedType = null;
try {
resolvedType = expression.calculateResolvedType();
}
catch(Throwable t) {

if(t instanceof UnsolvedSymbolException) {
UnsolvedSymbolException unE = (UnsolvedSymbolException)t;
String name = unE.getName();
paramTypes.add(name);
}
t.printStackTrace();
continue;
}
String type = null;
Expand Down

0 comments on commit 8103a8a

Please sign in to comment.