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

Polymorphic function types #204

Open
susliko opened this issue Apr 22, 2023 · 0 comments
Open

Polymorphic function types #204

susliko opened this issue Apr 22, 2023 · 0 comments
Labels
area/scala3 Scala 3 syntax enhancement New feature or request

Comments

@susliko
Copy link
Collaborator

susliko commented Apr 22, 2023

Commit of tree-sitter-scala you tested this on

7d348f5

A code sample showing the error

object TypeLambdas {
  val f = [t] => (t: t) => t
}

Show the error node

 val_definition [1, 2] - [1, 28]
     pattern: identifier [1, 6] - [1, 7]
     value: infix_expression [1, 9] - [1, 28]
       left: infix_expression [1, 9] - [1, 23]
         left: generic_function [1, 9] - [1, 13]
           function: identifier [1, 9] - [1, 9]
           type_arguments: type_arguments [1, 10] - [1, 13]
             type_identifier [1, 11] - [1, 12]
         operator: operator_identifier [1, 14] - [1, 16]
         right: parenthesized_expression [1, 17] - [1, 23]
           ascription_expression [1, 18] - [1, 22]
             identifier [1, 18] - [1, 19]
             type_identifier [1, 21] - [1, 22]
       operator: operator_identifier [1, 24] - [1, 26]
       right: identifier [1, 27] - [1, 28]

type lambda is parsed as some infix expression

What do you expect the tree to look like

I'd expect some type-lambda clause in the tree

Where are you experiencing this error?

nvim-treesitter

@susliko susliko changed the title Type lambdas Polymorphic function types Apr 22, 2023
@susliko susliko added enhancement New feature or request area/scala3 Scala 3 syntax labels Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/scala3 Scala 3 syntax enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant