You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generator emits "semantic overload" types — narrower-named aliases of a base quantity, with implicit widening to the base, explicit narrowing from the base, and a From() factory. Examples: Weight over ForceMagnitude, Drag/Friction over Force1D, Distance/Depth/Altitude over Length, Diameter/Radius over Length.
Nothing in Semantics.Test covers any of this.
Evidence
Semantics.Quantities/Generated/.../Weight.g.cs and similar files emit:
public static implicit operator ForceMagnitude<T>(Weight<T> v)
public static explicit operator Weight<T>(ForceMagnitude<T> v)
public static Weight<T> From(ForceMagnitude<T> v)
Semantics.Test/ has no file referencing Weight, Drag, Diameter, Radius, or any other overload type.
Suggested next step
Add tests that:
Round-trip through implicit + explicit operators preserves value.
Weight + Weight stays Weight (verify operator preservation), but Weight + ForceMagnitude falls back to base ForceMagnitude (or whichever rule the generator chose — see also Resolve open design decision for Vector0 subtraction #52).
Diameter.ToRadius() / Radius.ToDiameter() use the metadata-defined relationship (Value / 2, Value * 2).
Cross-storage-type round-trips for double, float, decimal.
Summary
The generator emits "semantic overload" types — narrower-named aliases of a base quantity, with implicit widening to the base, explicit narrowing from the base, and a
From()factory. Examples:WeightoverForceMagnitude,Drag/FrictionoverForce1D,Distance/Depth/AltitudeoverLength,Diameter/RadiusoverLength.Nothing in
Semantics.Testcovers any of this.Evidence
Semantics.Quantities/Generated/.../Weight.g.csand similar files emit:public static implicit operator ForceMagnitude<T>(Weight<T> v)public static explicit operator Weight<T>(ForceMagnitude<T> v)public static Weight<T> From(ForceMagnitude<T> v)Semantics.Test/has no file referencingWeight,Drag,Diameter,Radius, or any other overload type.Suggested next step
Add tests that:
Weight + WeightstaysWeight(verify operator preservation), butWeight + ForceMagnitudefalls back to baseForceMagnitude(or whichever rule the generator chose — see also Resolve open design decision for Vector0 subtraction #52).Diameter.ToRadius()/Radius.ToDiameter()use the metadata-defined relationship (Value / 2,Value * 2).double,float,decimal.Area / Severity
Tests · incomplete