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
{{ message }}
Repository navigation
Position3D.Cross(Force3D) and Position3D.Cross(Velocity3D) don't compile: vector overloads don't forward their base's typed cross products #506
#456 made semantic overloads forward their base type's relationship operators, through ForwardedOperators in QuantitiesGenerator.cs. It did not forward the typed Cross and Dot methods. Those are emitted only for base vector types, from emission.ProductsByOwner (around QuantitiesGenerator.cs:1219-1241), and EmitVectorOverloadType never emits them.
They are instance methods on a readonly record struct. Neither inheritance nor implicit widening can reach them through the receiver.
Position3D is an overload of Displacement3D ("Location in 3D space relative to an origin"), so it is the natural r. Yet both cross products declared on Length are missing from it:
Position3D<double>r=Position3D<double>.FromMeter(0.5,0,0);Force3D<double>f=Force3D<double>.FromNewton(0,10,0);Velocity3D<double>v=Velocity3D<double>.FromMeterPerSecond(0,10,0);vartau=r.Cross(f);// CS1503: cannot convert Force3D<double> to Position3D<double>varh=r.Cross(v);// CS1503
Today callers have to write ((Displacement3D<double>)r).Cross(f). Translation3D has the same gap, and so will any future vector overload of a dimension that has typed products. An overload on the argument side already works, because the argument widens.
Priority: Medium. A real physics API (r × F and r × v on Position3D/Translation3D) doesn't compile. There is a working workaround: cast to Displacement3D<T> first. Nothing returns a wrong value silently.
Activity
matt-edmondson commentedon Oct 30, 2026
Triage
r × Fandr × vonPosition3D/Translation3D) doesn't compile. There is a working workaround: cast toDisplacement3D<T>first. Nothing returns a wrong value silently.EmitVectorOverloadTypeandProductsByOwnerinQuantitiesGenerator.cs. This continues Physics operators are unreachable when a semantic overload is the left operand:Distance / Duration,Width * ForceMagnitude,Weight * Lengthdo not compile #456, which forwarded operators but not the typedCross/Dotmethods.Mass * Acceleration3D,Mass * Velocity3DandCapacitance * Voltagedon't compile: products declared on a magnitude-only dimension never reach vector forms #505, filed at the same time, is another gap where generated vector-form relationships are missing, though in the vocabulary rather than in overload emission. The two fixes are independent but touch the same generator and the sameGeneratorOutputInvariantTests, so it may be worth landing them together.PH.ToPOH) and Add a SessionStart hook for Claude Code cloud sessions #483 (SessionStart hook).Generated by Claude Code