tree-sitter-kotlin icon indicating copy to clipboard operation
tree-sitter-kotlin copied to clipboard

Infix function declaration leads to error

Open CommanderTvis opened this issue 3 years ago • 1 comments
trafficstars

Source:

infix fun Int.oppa(a: Int) {
}

fun main() {
  1 oppa 4
}

CommanderTvis avatar Oct 28 '22 09:10 CommanderTvis

This has been fixed.

(source_file [0, 0] - [6, 0]
  (function_declaration [0, 0] - [1, 1]
    (modifiers [0, 0] - [0, 5]
      (function_modifier [0, 0] - [0, 5]))
    (user_type [0, 10] - [0, 13]
      (type_identifier [0, 10] - [0, 13]))
    (simple_identifier [0, 14] - [0, 18])
    (function_value_parameters [0, 18] - [0, 26]
      (parameter [0, 19] - [0, 25]
        (simple_identifier [0, 19] - [0, 20])
        (user_type [0, 22] - [0, 25]
          (type_identifier [0, 22] - [0, 25]))))
    (function_body [0, 27] - [1, 1]))
  (function_declaration [3, 0] - [5, 1]
    (simple_identifier [3, 4] - [3, 8])
    (function_value_parameters [3, 8] - [3, 10])
    (function_body [3, 11] - [5, 1]
      (statements [4, 2] - [4, 10]
        (infix_expression [4, 2] - [4, 10]
          (integer_literal [4, 2] - [4, 3])
          (simple_identifier [4, 4] - [4, 8])
          (integer_literal [4, 9] - [4, 10]))))))

ObserverOfTime avatar Oct 16 '23 09:10 ObserverOfTime