kotlin-spec icon indicating copy to clipboard operation
kotlin-spec copied to clipboard

Grammar: empty body after delegate parsed as lambda expression

Open belyaev-mikhail opened this issue 4 years ago • 0 comments

object : Base, Base2 by Delegate() {     }

the {} in the end is parsed as a lambda expression, but

  • trailing lambdas are forbidden for delegation expressions
  • it is, in fact, a class body

belyaev-mikhail avatar Jan 27 '21 18:01 belyaev-mikhail