Skip to content

Enforce that abstract members are implemented#1690

Draft
bioball wants to merge 1 commit into
mainfrom
abstract-member-implementation-check
Draft

Enforce that abstract members are implemented#1690
bioball wants to merge 1 commit into
mainfrom
abstract-member-implementation-check

Conversation

@bioball

@bioball bioball commented Jun 22, 2026

Copy link
Copy Markdown
Member

This adds a check that abstract members must be implemented.
If any members lack an implementation, an error is thrown describing
the missing members.

Some open questions here:

  1. Should we get rid of abstract properties? Semantically, they're kind of strange because class properties already don't need an implementation.
  2. Should we require the override modifier when overriding?
  3. What should we do in the case of overriding properties that don't add a type annotation? Currently, we say "these properties don't contribute to the class definition", which means foo = 1 should not be a valid implementation of abstract foo: Int.

Closes #1262

This adds a check that abstract members must be implemented.
If any members lack an implementation, an error is thrown describing
the missing members.

Also: we have a bug in `pkl:base`; class `Set` does not implement all
members of class `Collection`.
@HT154
HT154 force-pushed the abstract-member-implementation-check branch from a6b0269 to e7023df Compare July 20, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extending an abstract class **without** overriding an abstract property crashes with ambiguous message

1 participant