Skip to content

Conversation

@mmsmits
Copy link
Member

@mmsmits mmsmits commented Sep 13, 2022

fixes: #2183

@mmsmits mmsmits requested a review from ewoutkramer September 13, 2022 15:09
}
}
else
{
Copy link
Member

Choose a reason for hiding this comment

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

This block should move to line 41 (so just under var instanceType = ModelIInfo.FhirTypeNameToFhirType(..) : it's applicable to both choice and non-choice elements.

{
// Only one type present in list of typerefs, all of the typerefs are candidates
outcome.Include(validator.ValidateTypeReferences(typeRefs, instance, state));
validator.Trace(outcome, "ElementDefinition is a choice or contains a polymorphic type constraint, but the instance does not indicate its actual type",
Copy link
Member

Choose a reason for hiding this comment

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

This should not be a reachable code path when choices.Count() = 1.

@mmsmits mmsmits requested a review from ewoutkramer September 14, 2022 12:38
@ewoutkramer ewoutkramer merged commit 7e7a32c into develop-stu3 Sep 14, 2022
@ewoutkramer ewoutkramer deleted the bugfix/2183-also-validate-parent-type-when-validating-children branch September 14, 2022 13:04
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.

Validator ignores valueString for value type sliced to be Quantity

3 participants