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]: Forwarding to a badly formatted var declaration causes an internal error #25067

Open
bradcray opened this issue May 16, 2024 · 0 comments

Comments

@bradcray
Copy link
Member

bradcray commented May 16, 2024

Summary of Problem

Description:

When applying forwarding to a variable declaration, I got an internal error. At first, I was worried it was a case of the feature being brittle in an advanced use case, but it turns out I just had something more akin to a syntax error in my code that caused the issue.

In developer mode, this shows up as:

[/path/to/frontend/lib/parsing/ParserContextImpl.h:2468 in buildForwardingDecl] Assertion failed: cs.stmt->isVariable() || cs.stmt->isMultiDecl() || cs.stmt->isTupleDecl()
error: invoking driver compilation phase

In user mode, it's:

Internal errors indicate a bug in the Chapel compiler,
and we're sorry for the hassle.  We would appreciate your reporting this bug --
please see https://chapel-lang.org/bugs.html for instructions.

Is this a blocking issue with no known work-arounds?

no, the workaround is to fix the user error. E.g., in the example below, I should've used something more like var m: map(int, real);

Steps to Reproduce

Source Code:

use Map;

class C {
  forwarding var map(int, real);
}

var myC = new C();
myC.add(1, 2.3);

Associated Future Test(s):
test/classes/forwarding/forwardToNonVar.chpl #25068

Configuration Information

  • Output of chpl --version: chpl version 2.1.0 pre-release (af0a260238)
bradcray added a commit to bradcray/chapel that referenced this issue May 16, 2024
---
Signed-off-by: Brad Chamberlain <bradcray@users.noreply.github.com>
bradcray added a commit that referenced this issue May 17, 2024
…able declaration (#25068)

[trivial, not reviewed]

Adding a future for #25067
arezaii pushed a commit to arezaii/chapel that referenced this issue May 21, 2024
---
Signed-off-by: Brad Chamberlain <bradcray@users.noreply.github.com>
riftEmber pushed a commit to riftEmber/chapel that referenced this issue May 23, 2024
---
Signed-off-by: Brad Chamberlain <bradcray@users.noreply.github.com>
riftEmber pushed a commit to riftEmber/chapel that referenced this issue May 23, 2024
---
Signed-off-by: Brad Chamberlain <bradcray@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant