Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix checkcast generation for bundled function args #42505

Merged

Conversation

gabilang
Copy link
Contributor

@gabilang gabilang commented Apr 8, 2024

Purpose

$title

Fixes #42504

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@gabilang gabilang added the Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime label Apr 8, 2024
@gabilang gabilang closed this Apr 9, 2024
@gabilang gabilang reopened this Apr 9, 2024
// https://github.com/ballerina-platform/ballerina-lang/issues/42456.
if (jMethodRequest.receiverType == null || functionParamCount < 1
|| count < reducedParamCount || count > reducedParamCount + 2
|| Symbols.isFlagOn(jMethodRequest.bParamTypes[0].flags, Flags.SERVICE)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove this check once addressed the issue #42456. The logic used to bundle the parameters clashes with following use cases without the introduced check. https://github.com/ballerina-platform/module-ballerina-graphql/blob/8bd564d7d2eb2513a377bc58cc5d94a7d762803d/ballerina/engine.bal#L427 Anyway, Specifying the parameter annotation will resolve the conflicts.

Copy link
Contributor

@warunalakshitha warunalakshitha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@warunalakshitha warunalakshitha merged commit 95baf7c into ballerina-platform:master Apr 25, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Type cast error when bundling BObject type parameter into BArray in interop methods
2 participants