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]: Using a type function in an implements statement segfaults #25824

Open
jabraham17 opened this issue Aug 27, 2024 · 0 comments
Open

[Bug]: Using a type function in an implements statement segfaults #25824

jabraham17 opened this issue Aug 27, 2024 · 0 comments

Comments

@jabraham17
Copy link
Member

The following code results in a segfault

interface foo { }
proc get type do return foo;

record R { }
R implements get;

This is because the compiler is expecting that in R implements get, get is a plain interface symbol.

If get is a type alias, the compiler gives an error that get is not an interface. If the record is written as record R: get { }, then the compiler gives an error about an illegal super class.

Whether or not TYPE implements function_returning_interface should be valid Chapel is an interesting design question (I think it should be), but at the very least it should not be an internal error.

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