Skip to content

Top level vals are not re-initialized if their initializing methods are in another class and changed #230

@pjBooms

Description

@pjBooms

Consider we have a Kotlin file:

Val.kt:

val greeting = getGreeting()

where getGreeting() in another file:

Greeting.kt:

fun getGreeting() = "Hello"

If we change getGreeting() body val greeting will remain the same.

Screen.Recording.2025-06-17.at.4.22.44.PM.mov

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions