Skip to content

Commit a827e8d

Browse files
committed
Reverted ModelType property to be virtual
While the recent update to avoid read-only `virtual` properties (532c49d) generally makes sense, and should be maintained for most types, it doesn't make sense for `ModelType` as some implementations of this actually need to be dynamic, as they conditionally rely on the _current_ value from `Attributes`. As the `Attributes` aren't populated until after the constructor has initialized the object, that results in the `ModelType` never being updated based on these values. Oops!
1 parent ae00cfe commit a827e8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OnTopic/Metadata/AttributeDescriptor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public AttributeDescriptor(
9090
/// reduces these down into a single type based on how they're exposed in the Topic Library, not based on how they're
9191
/// exposed in the editor.
9292
/// </remarks>
93-
public ModelType ModelType { get; protected init; } = ModelType.ScalarValue;
93+
public virtual ModelType ModelType { get; protected init; } = ModelType.ScalarValue;
9494

9595
/*==========================================================================================================================
9696
| PROPERTY: EDITOR TYPE

0 commit comments

Comments
 (0)