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]: No error given for illegal cyclic reference #43715

Open
rdulmina opened this issue Dec 17, 2024 · 0 comments
Open

[Bug]: No error given for illegal cyclic reference #43715

rdulmina opened this issue Dec 17, 2024 · 0 comments
Assignees
Labels
Area/CodeAnalysis Data flow , Code and Closure analysis related issues #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug

Comments

@rdulmina
Copy link
Contributor

Description

illegal cyclic reference not given for the following sample

function() returns boolean a = function() returns boolean {
    return b;
};

boolean b = a();

The following sample gives the error as expected

function a() returns boolean {
    return b;
};

boolean b = a();

To be consistent, the first sample should also give an error

Steps to Reproduce

No response

Affected Version(s)

No response

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@rdulmina rdulmina added Type/Bug Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Area/CodeAnalysis Data flow , Code and Closure analysis related issues #Compiler labels Dec 17, 2024
@rdulmina rdulmina changed the title [Bug]: No [Bug]: No error given for illegal cyclic reference Dec 17, 2024
rdulmina added a commit to rdulmina/ballerina-lang that referenced this issue Dec 20, 2024
@rdulmina rdulmina self-assigned this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CodeAnalysis Data flow , Code and Closure analysis related issues #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Projects
None yet
Development

No branches or pull requests

1 participant