Is "object" a keyword or reserved word?


I note in under "Class Objects" that "object" is not highlighted as a keyword, nor is it described as a keyword or reserved word.

But in, under “Object Declarations”  it appears to be used as a keyword, as in

object DataProviderManager {
  fun registerDataProvider(provider : DataProvider) { // … }
  val allDataProviders : Collection<DataProvider> get() = // …

I don’t see a list of keywords anywhere – is there one?


Here's the list of (hard) keywords from the sources:

I think there might be no list in the docs, we’ll fix this :slight_smile:

A note on hard vs soft keywords: some words in Kotlin may have syntactical meaning in particular contexts, but are still allowed to be used as identifiers. They are called “soft” keywords.
For example: “import”, “get”, “set”, “by”, “public” etc are soft keywords. The full list can be found here:


OK, so "object" is a keyword but it is not getting syntax highlighting in the docs, then. Should I be reporting that as a bug?


Yes, please. Thanks a lot


I've just logged this one. Thanks.



does not exists, can you please provide a working link?

Thank you!