Skip to content

Language record

Kotlin

Kotlin is indexed with both spellings of an override — a keywordless implementation of an abstract member is matched just as an override one is — and a data class's generated members are recorded as generated rather than as if a person had written them.

.kt, .kts · 1 registry id · 11 of 14 relationship types

The registry row this page is generated from

Read at render time from the same family row the register reads, so nothing in this block can disagree with it.

Extensions
.kt, .kts
Registry names
kotlin
Recorded symbols
classes · interfaces · methods · constructors

Relationship types this analyzer constructs

11 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.

Relationship typeConstructed
callsconstructed by this analyzer
extendsconstructed by this analyzer
implementsconstructed by this analyzer
usesconstructed by this analyzer
importsconstructed by this analyzer
exportsconstructed by this analyzer
containsconstructed by this analyzer
referencesconstructed by this analyzer
overridesconstructed by this analyzer
instantiatesconstructed by this analyzer
decoratesruled absent
rendersconstructed by this analyzer
mixes_inruled absent
part_ofruled absent

11 constructed, 3 not constructed. All 3 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.

What this analyzer does not resolve

  • An expression-body function has no inferable return type: fun f() = 42 reports none rather than guessing Int from the literal.
  • An extension function is recorded against the receiver type it extends as a use carrying an is-extension marker, never as extends — labelling it inheritance would fabricate hierarchy that is not in the code.
  • A generated data-class member is published at reduced confidence and with no line number, because it is derived from the class rather than written in it, and a line would point at the wrong place.

Every line above was written against Kotlin’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.

Where you meet it in a repository

Recognised by extension — .kt, .kts. Everything below is about where those files actually sit in a working repository.

  • A Kotlin service is usually an interface plus its implementation in the same file, so the contract and its only implementer sit together.
  • Jetpack Compose builds a UI out of nested function calls, and the annotation sits on the enclosing function rather than on a type.
  • Extension functions live at file scope in a file that may not import the type they extend, so the receiver type is often the only thing connecting them.

Questions this index answers

Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.

  1. Which classes implement this interface?
  2. Which of these members did the data class generate?
  3. Which extension function is declared for this receiver type?
  4. Where is this coroutine launched from?

What the analyzer sees in code like this

A data class with generated members, an interface, and a suspending method
data class Column(val type: String)   // bb records: class Column · generated component1

interface Repo { fun findAll(): List<Column> }

class ColumnController(private val repo: Repo) {
    // bb records: method list, marked as suspending
    suspend fun list(): List<Column> = repo.findAll()
}

Symbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.

Languages that turn up in the same repository

Application & systems — the count beside each name is how many relationship types that family’s analyzer constructs.

The extensions, registry names, recorded symbols and relationship types above are the parser registry row for Kotlin, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.