-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed location property on TypedElementOnSourceNode.cs #2747
Conversation
src/Hl7.Fhir.ElementModel.Shared.Tests/TypedElementOnSourceNodeTests.cs
Outdated
Show resolved
Hide resolved
@@ -45,7 +48,7 @@ public TypedElementOnSourceNode(ISourceNode source, string type, IStructureDefin | |||
throw Error.Format(nameof(type), $"Cannot determine the type of the root element at '{_source.Location}', " + | |||
$"please supply a type argument."); | |||
else | |||
return (rootType, null); | |||
return (rootType!, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's consider this for a bit - for the first time we are kind of lying here, and we're now saying: "in 98% of the cases, this is non-null - so it's not null". But is 98% good enough? Or should we drop de bang and add a #pragma to make it clear we're dodging the nullability warning?
…into feature/location-itypedelement
Description
TypedElementOnSourceNode.Location should now correctly omit choice type suffixes (like in PocoElementNode)
Related issues
Fixes issue #2642
Testing
Added new unit tests testing some edge cases