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

Allow intersection types in case of pattern matching #11864

Open
JaroslavTulach opened this issue Dec 13, 2024 · 2 comments
Open

Allow intersection types in case of pattern matching #11864

JaroslavTulach opened this issue Dec 13, 2024 · 2 comments
Assignees
Labels
-compiler p-medium Should be completed in the next few sprints

Comments

@JaroslavTulach
Copy link
Member

As Pavel wrote right now we get syntax error

case ax of
    _: A&X -> ...

fails with:

tmp.enso:27:12: error: Syntax is not supported yet: qualifiedNameSegment.
   27 |         _: A&X -> "Is A&X"
      |            ^~~
@JaroslavTulach JaroslavTulach added the p-medium Should be completed in the next few sprints label Dec 13, 2024
@kazcw
Copy link
Contributor

kazcw commented Dec 13, 2024

The AST looks reasonable:

> echo -e 'case ax of\n    _: A&X -> 42' | cargo run -p enso-parser-debug --bin enso-parser-debug
(BodyBlock #((CaseOf (Ident ax) #(((() (TypeAnnotated (Wildcard -1) ":" (OprApp (Ident A) (Ok "&") (Ident X))) "->" (Number () "42" ()))))) ()))

The syntax error probably originates in TreeToIr.

@farmaazon
Copy link
Contributor

Is this -parser or some engine label (-compiler or -language-server?)

@JaroslavTulach JaroslavTulach self-assigned this Dec 16, 2024
@JaroslavTulach JaroslavTulach moved this from ❓New to 📤 Backlog in Issues Board Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-compiler p-medium Should be completed in the next few sprints
Projects
Status: 📤 Backlog
Development

No branches or pull requests

3 participants