Skip to content

Commit 465c2fe

Browse files
authored
(kotlin) remove very old keywords and update example code (highlightjs#2623)
Removes obsolete Kotlin keywords and updates example. - These are no longer valid Kotlin keywords. (and there removal from the grammar was suggested years ago) - Also remove the `trait` usage from the example and format the code according to the Kotlin coding conventions. Reference: highlightjs@af601cb
1 parent 7bd0d62 commit 465c2fe

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ New themes:
77
Language Improvements:
88

99
- enh(matlab) Add new R2019b `arguments` keyword and fix `enumeration` keyword (#2619) [Andrew Janke][]
10+
- fix(kotlin) Remove very old keywords and update example code (#2623) [kageru][]
1011

1112
[Andrew Janke]: https://github.com/apjanke
1213
[Samia Ali]: https://github.com/samiaab1990
14+
[kageru]: https://github.com/kageru
1315

1416

1517
## Version 10.1.1

src/languages/kotlin.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ export default function(hljs) {
1414
'crossinline dynamic final enum if else do while for when throw try catch finally ' +
1515
'import package is in fun override companion reified inline lateinit init ' +
1616
'interface annotation data sealed internal infix operator out by constructor super ' +
17-
'tailrec where const inner suspend typealias external expect actual ' +
18-
// to be deleted soon
19-
'trait volatile transient native default',
17+
'tailrec where const inner suspend typealias external expect actual',
2018
built_in:
2119
'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',
2220
literal:

test/detect/kotlin/default.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import kotlin.lang.test
22

3-
trait A {
3+
interface A {
44
fun x()
55
}
66

7-
fun xxx() : Int {
8-
return 888
7+
fun xxx(): Int {
8+
return 888
99
}
1010

11-
public fun main(args : Array<String>) {
11+
public fun main(args: Array<String>) {
1212
}

0 commit comments

Comments
 (0)