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

[Bug]: Typo in error message when an external function is declared with no java class specified #41620

Closed
lochana-chathura opened this issue Nov 1, 2023 · 6 comments
Assignees
Labels
Area/Diagnostics Issues related Diagnostics reported by the Compiler. #Compiler Area/JavaInterop Java interoperability in Ballerina good first issue Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug

Comments

@lochana-chathura
Copy link
Member

lochana-chathura commented Nov 1, 2023

Description

$subject. Run the following code.

function foo() {
    function (typedesc<int> x) returns int fn1 = bar;
}

function bar(typedesc<int> y) returns y = external;

It will give error: cannot find full qualified class name for extern function : lochanaj/Sample/0/bar

Note the typo extern in the error message.

Affected Version(s)

2201.8.1

@lochana-chathura lochana-chathura added Type/Bug good first issue Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Area/JavaInterop Java interoperability in Ballerina Area/Diagnostics Issues related Diagnostics reported by the Compiler. #Compiler labels Nov 1, 2023
@MaryamZi
Copy link
Member

MaryamZi commented Nov 2, 2023

external functions used to be extern functions at one point :) Looks like we've missed updating the error here.

@gabilang
Copy link
Contributor

gabilang commented Nov 2, 2023

What would be the correct word to use here? external function or foreign function

@lochana-chathura
Copy link
Member Author

What would be the correct word to use here? external function or foreign function

external function, as per the spec terms and syntax.

@gabilang gabilang moved this from BackLog to In Progress in Ballerina Team Main Board Nov 3, 2023
@gabilang gabilang moved this from In Progress to PR Sent in Ballerina Team Main Board Nov 3, 2023
@gabilang
Copy link
Contributor

The above requested fix is no longer required since the old-style external function wrapper related implementations have been removed from the ExternalMethodGen.java class. Hence closing this issue.

@github-project-automation github-project-automation bot moved this from PR Sent to Done in Ballerina Team Main Board Nov 21, 2023
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

@lochana-chathura
Copy link
Member Author

New issue to be addressed: #41744

@lochana-chathura lochana-chathura added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Diagnostics Issues related Diagnostics reported by the Compiler. #Compiler Area/JavaInterop Java interoperability in Ballerina good first issue Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants