Skip to content

Unify requiredBacked and nullableBacked properties#4

Open
n0900 wants to merge 8 commits into
developmentfrom
feature/betterTypes
Open

Unify requiredBacked and nullableBacked properties#4
n0900 wants to merge 8 commits into
developmentfrom
feature/betterTypes

Conversation

@n0900

@n0900 n0900 commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Asser that T: Any to allow kotlinx serialization to automatically define nullable serializer and guarantee that type is not nullable in the case non-nullable function is used

Unify the two backed property paths

@n0900 n0900 requested a review from JesusMcCloud June 15, 2026 15:46

@JesusMcCloud JesusMcCloud left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems counterintuitive to enforce non-null types for nullables

@n0900

n0900 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

seems counterintuitive to enforce non-null types for nullables

thats true but if we dont then .backedProperty<T?> is equivalent to .nullableBackedProperty<T> making the distinction redundant. Consequently I removed the .nullableBackedProperty path

@n0900 n0900 requested a review from JesusMcCloud June 17, 2026 12:58
@n0900 n0900 changed the base branch from main to development June 17, 2026 12:59
@n0900 n0900 force-pushed the feature/betterTypes branch from f998621 to 9fa6c6b Compare June 17, 2026 13:01
@n0900 n0900 changed the title Improve type safety and add custom serializer param to nullableBacked Unify requiredBacked and nullableBacked properties Jun 17, 2026
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.

2 participants