diff --git a/src/Hl7.Fhir.Base/Model/CodeOfT.cs b/src/Hl7.Fhir.Base/Model/CodeOfT.cs index 5dd8b2d3d..de59e4ac6 100644 --- a/src/Hl7.Fhir.Base/Model/CodeOfT.cs +++ b/src/Hl7.Fhir.Base/Model/CodeOfT.cs @@ -46,7 +46,7 @@ namespace Hl7.Fhir.Model [FhirType("codeOfT")] [DataContract] [System.Diagnostics.DebuggerDisplay(@"\{Value={Value}}")] - public class Code : PrimitiveType, INullableValue, ISystemAndCode where T : struct, Enum + public class Code : Code, INullableValue, ISystemAndCode where T : struct, Enum { static Code() { @@ -66,7 +66,7 @@ public Code(T? value) // Primitive value of element [FhirElement("value", IsPrimitiveValue = true, XmlSerialization = XmlRepresentation.XmlAttr, InSummary = true, Order = 30)] [DataMember] - public T? Value + new public T? Value { get => TryParseObjectValue(out var value) ? value @@ -94,7 +94,7 @@ internal bool TryParseObjectValue(out T? value) string ISystemAndCode.Code => Value?.GetLiteral(); - public S.Code ToSystemCode() => new(Value?.GetSystem(), Value?.GetLiteral(), display: null, version: null); + new public S.Code ToSystemCode() => new(Value?.GetSystem(), Value?.GetLiteral(), display: null, version: null); public override IEnumerable Validate(ValidationContext validationContext) {