branch: elpa/kotlin-mode
commit 472ae23d6ad0fd17c6fc362efc20ece3d0264969
Author: Colin Fuller <[email protected]>
Commit: Colin Fuller <[email protected]>

    Fix syntax highlighting of star-projected types
    
    Previously, when encountering a star-projected type (like `List<*>`),
    kotlin-mode would highlight it only to the opening `<`. This commit adds 
`*` to
    the characters that can appear in a type so that it correctly highlights
    through the closing `>`.
    
    Tested by creating a file `test.kt` with the following contents:
    ```
    val x: List<*> = f()
    ```
    Prior to this commit, this would only highlight through the opening `<`, 
now it
    highlights through the closing `>`.
---
 kotlin-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index dda9cdc2ac..143cc880e4 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -214,7 +214,7 @@
 
     ;; Types
     (,(rx-to-string
-      `(and bow upper (group (* (or word "<" ">" "." "?" "!"))))
+      `(and bow upper (group (* (or word "<" ">" "." "?" "!" "*"))))
       t)
      0 font-lock-type-face)
 

Reply via email to