emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/kotlin-mode 2f64645460 08/10: Support definitely non-nulla


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode 2f64645460 08/10: Support definitely non-nullable type
Date: Tue, 17 Jan 2023 15:08:09 -0500 (EST)

branch: elpa/kotlin-mode
commit 2f64645460b78d76b053efb01b20e9d04192aef8
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>

    Support definitely non-nullable type
---
 kotlin-mode-lexer.el | 8 ++++----
 test/pathological.kt | 9 +++++++++
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/kotlin-mode-lexer.el b/kotlin-mode-lexer.el
index 0402325443..8e99415247 100644
--- a/kotlin-mode-lexer.el
+++ b/kotlin-mode-lexer.el
@@ -683,7 +683,7 @@ expression as a token with one of the following types:
         '(implicit-\; string-chunk-before-template-expression))
        (member
         (kotlin-mode--token-text previous-token)
-        '("(" "{" "[" "*" "%" "/" "+" "-" "&&" "||" ":"
+        '("(" "{" "[" "*" "%" "/" "+" "-" "&&" "||" ":" "&"
           "=" "+=" "-=" "*=" "/=" "%="
           "->" "." ".." "::" "?:" "?." "<=" ">=" "!=" "!==" "==" "==="
           "as" "as?" "is" "!is" "in" "!in" "," ";" "{" "[" "("
@@ -790,7 +790,7 @@ expression as a token with one of the following types:
            '(implicit-\; string-chunk-after-template-expression))
           (member
            (kotlin-mode--token-text next-token)
-           '("*" "%" "/" "&&" "||" ":" "=" "+=" "-=" "*=" "/=" "%="
+           '("*" "%" "/" "&" "&&" "||" ":" "=" "+=" "-=" "*=" "/=" "%="
              "->" "." ".." "::" "?:" "?." "?" "<" ">" "<=" ">="
              "!=" "!==" "==" "==="
              "," ";" ")" "]" "}"
@@ -1828,7 +1828,7 @@ This function does not return `implicit-;'."
        "=" "+=" "-=" "*=" "/=" "%="
        "->"
        ".." "." "?:" "?." "?" "<" ">" "<=" ">=" "==" "==="
-       "*" "%" "/" "+" "-")))
+       "*" "%" "/" "+" "-" "&")))
     (let ((text (match-string-no-properties 0))
           (start (match-beginning 0))
           (end (match-end 0)))
@@ -2233,7 +2233,7 @@ This function does not return `implicit-;'"
    ((member (buffer-substring-no-properties
              (max (point-min) (- (point) 1))
              (point))
-            '("*" "%" "/" "+" "-" "!" "=" "." "?" "<" ">"))
+            '("*" "%" "/" "+" "-" "!" "=" "." "?" "<" ">" "&"))
     (backward-char)
     (make-instance 'kotlin-mode--token
                    :type 'operator
diff --git a/test/pathological.kt b/test/pathological.kt
index c12342fe66..b17d82a297 100644
--- a/test/pathological.kt
+++ b/test/pathological.kt
@@ -426,6 +426,15 @@ public
         ->
         C
 
+    // definitelyNonNullableType
+    fun foo(
+        x:
+            A
+            &
+            Any
+    ) {
+    }
+
     // value class
 
     value



reply via email to

[Prev in Thread] Current Thread [Next in Thread]