Skip to content

Commit

Permalink
(kotlin) remove very old keywords and update example code (#2623)
Browse files Browse the repository at this point in the history
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:
af601cb
  • Loading branch information
kageru committed Jul 2, 2020
1 parent 7bd0d62 commit 465c2fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ New themes:
Language Improvements:

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

[Andrew Janke]: https://github.com/apjanke
[Samia Ali]: https://github.com/samiaab1990
[kageru]: https://github.com/kageru


## Version 10.1.1
Expand Down
4 changes: 1 addition & 3 deletions src/languages/kotlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ export default function(hljs) {
'crossinline dynamic final enum if else do while for when throw try catch finally ' +
'import package is in fun override companion reified inline lateinit init ' +
'interface annotation data sealed internal infix operator out by constructor super ' +
'tailrec where const inner suspend typealias external expect actual ' +
// to be deleted soon
'trait volatile transient native default',
'tailrec where const inner suspend typealias external expect actual',
built_in:
'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',
literal:
Expand Down
8 changes: 4 additions & 4 deletions test/detect/kotlin/default.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import kotlin.lang.test

trait A {
interface A {
fun x()
}

fun xxx() : Int {
return 888
fun xxx(): Int {
return 888
}

public fun main(args : Array<String>) {
public fun main(args: Array<String>) {
}

0 comments on commit 465c2fe

Please sign in to comment.