Skip to content

Commit

Permalink
fix: native image
Browse files Browse the repository at this point in the history
  • Loading branch information
4e6 committed Dec 24, 2024
1 parent 0663c2a commit d15c59f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public ModuleScope getDefinitionScope() {
* @return the number of args expected by the constructor.
*/
public int getArity() {
return constructorFunction.get().getSchema().getArgumentsCount();
return fieldNames.length;
}

/**
Expand Down Expand Up @@ -320,6 +320,7 @@ public String toString() {
*
* @return the constructor function of this constructor.
*/
@TruffleBoundary
public Function getConstructorFunction() {
return constructorFunction.get();
}
Expand Down Expand Up @@ -398,6 +399,7 @@ final Layout[] getUnboxingLayouts() {
return unboxingLayouts;
}

@TruffleBoundary
final Layout getBoxedLayout() {
return boxedLayout.get();
}
Expand Down Expand Up @@ -490,7 +492,7 @@ public QualifiedName getQualifiedTypeName() {
* @return the fields defined by this constructor.
*/
public ArgumentDefinition[] getFields() {
return constructorFunction.get().getSchema().getArgumentInfos();
return getConstructorFunction().getSchema().getArgumentInfos();
}

/**
Expand Down

0 comments on commit d15c59f

Please sign in to comment.