nishtahir / language-kotlin

Textmate language grammar for the Kotlin programming language
Apache License 2.0
12 stars 6 forks source link

Does not highlight methods correctly #9

Closed Pato94 closed 4 years ago

Pato94 commented 5 years ago

As you can see in the following image, there's a little issue with the highlighting at the first method of this object image

Basic Example

val a = SomeClass(object : SomeInterface {
  override fun someMethod() {
    b = someExternalMethod()
    c.someCMethod(b)
  }

  override fun anotherMethod() {
  }
})

Digging a little deeper, I found out that if you remove the first line of someMethod, highlighting for the second method goes off too!

val a = SomeClass(object : SomeInterface {
  override fun someMethod() {
    c.someCMethod(b)
  }

  override fun anotherMethod() {
  }
})

So I'm not really sure about what's going on here, but this is valid kotlin and I think it should be correctly highlighted.

:wave:

nishtahir commented 4 years ago

Looks like this was fixed in #21.