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

Compiler plugin crashes when using a new-expr with a user-defined class in the same source #2815

Closed
MaryamZi opened this issue Mar 27, 2022 · 0 comments · Fixed by ballerina-platform/module-ballerina-websubhub#495
Assignees
Labels
module/websubhub Issues related to Ballerina websubhub module Points/0.5 Priority/High

Comments

@MaryamZi
Copy link
Member

Description:
$title. Had to use an object constructor as a workaround, but this is not quite an acceptable solution if one needs to use the class in multiple places.

Steps to reproduce:

import ballerina/websubhub as _;

class Foo {
    
}

public function main() {
    _ = new Foo();
}
error: compilation failed: The compiler extension in package 'ballerina:websubhub:1.2.1' failed to complete. class io.ballerina.compiler.syntax.tree.SimpleNameReferenceNode cannot be cast to class io.ballerina.compiler.syntax.tree.QualifiedNameReferenceNode (io.ballerina.compiler.syntax.tree.SimpleNameReferenceNode and io.ballerina.compiler.syntax.tree.QualifiedNameReferenceNode are in unnamed module of loader 'app')

Affected Versions:
1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/websubhub Issues related to Ballerina websubhub module Points/0.5 Priority/High
Projects
None yet
2 participants