Skip to content

Conversation

@AlexandrosAlexiou
Copy link

…, delegate, file)

Adds 7 missing contextual keywords for completeness.

Problem:
Missing soft keywords that can be used as identifiers in some contexts but have special meaning in others (like annotations).

Changes:

  • simple_identifier: Added field, property, receiver, param, setparam, delegate, file

These are used in annotation use-site targets:
@field:Inject val name: String @Property:JsonProperty val id: Int @param:NotNull name: String

Also used as regular identifiers:
val field = "value" val property = obj.property

Reference: Kotlin soft keywords specification
Tests: 111/111 pass

…, delegate, file)

Adds 7 missing contextual keywords for completeness.

Problem:
Missing soft keywords that can be used as identifiers in some
contexts but have special meaning in others (like annotations).

Changes:
- simple_identifier: Added field, property, receiver, param,
  setparam, delegate, file

These are used in annotation use-site targets:
  @field:Inject val name: String
  @Property:JsonProperty val id: Int
  @param:NotNull name: String

Also used as regular identifiers:
  val field = "value"
  val property = obj.property

Reference: Kotlin soft keywords specification
Tests: 111/111 pass
@github-actions github-actions bot added the grammar Related to the grammar label Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

grammar Related to the grammar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant