Skip to content

Implement subtyping rules for choice item types#2620

Merged
ChristianGruen merged 1 commit intoBaseXdb:mainfrom
GuntherRademacher:choice-item-type-subtyping
Mar 17, 2026
Merged

Implement subtyping rules for choice item types#2620
ChristianGruen merged 1 commit intoBaseXdb:mainfrom
GuntherRademacher:choice-item-type-subtyping

Conversation

@GuntherRademacher
Copy link
Member

This PR implements the subtyping rules for choice item types by expanding item(), node(), gnode(), and xs:anyAtomicType in instanceOf tests. In addition, xs:numeric is handled via expansion, too, because it is not represented as a choice.

As part of this change, ChoiceItemType has been refactored to operate directly on Type instead of SeqType. It used to be based on SeqType members when SeqType carried the details of node types.

This fixes QT4 test cases subtyping-027, subtyping-029, subtyping-030, and subtyping-032.

@ChristianGruen ChristianGruen merged commit ffaa91f into BaseXdb:main Mar 17, 2026
1 check passed
@ChristianGruen ChristianGruen deleted the choice-item-type-subtyping branch March 17, 2026 08:57
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