tree-sitter / tree-sitter-scala

Scala grammar for tree-sitter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Structural types in `extends` clause

susliko opened this issue · comments

Commit of tree-sitter-scala you tested this on

374709c

A code sample showing the error

object namerFactory extends {
  val a: A = b
} 

Show the error node

(compilation_unit [0, 0] - [4, 0]
  (object_definition [0, 0] - [2, 1]
    name: (identifier [0, 7] - [0, 19])
    (ERROR [0, 20] - [0, 27])
    body: (template_body [0, 28] - [2, 1]
      (val_definition [1, 2] - [1, 14]
        pattern: (identifier [1, 6] - [1, 7])
        type: (type_identifier [1, 9] - [1, 10])
        value: (identifier [1, 13] - [1, 14])))))

What do you expect the tree to look like

No response

Where are you experiencing this error?

Reading Scala compiler code is like reading some ancient scrolls:
Analyzer.scala