Skip to content

Conversation

@AlexandrosAlexiou
Copy link

Enables suspend function types in class delegation.

Problem:
Classes couldn't delegate to suspend function types, needed for coroutines-based architectures.

Changes:

  • delegation_specifier: Added seq("suspend", $._type)
  • conflicts: Added [$.delegation_specifier, $._type_modifier]

Example:
interface Handler : suspend () -> Result class MyHandler : Handler by suspendImpl

Conflict needed because 'suspend' appears as type modifier and in delegation, creating parser ambiguity.

Tests: 111/111 pass

Enables suspend function types in class delegation.

Problem:
Classes couldn't delegate to suspend function types, needed for
coroutines-based architectures.

Changes:
- delegation_specifier: Added seq("suspend", $._type)
- conflicts: Added [$.delegation_specifier, $._type_modifier]

Example:
  interface Handler : suspend () -> Result
  class MyHandler : Handler by suspendImpl

Conflict needed because 'suspend' appears as type modifier
and in delegation, creating parser ambiguity.

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