Skip to content

feat: support same-dimension arithmetic - #8

Merged
ScottishTapWater merged 1 commit into
mainfrom
feat/same-dimension-arithmetic
Oct 22, 2026
Merged

ScottishTapWater merged 1 commit into
mainfrom
feat/same-dimension-arithmetic

Conversation

@ScottishTapWater

Copy link
Copy Markdown
Contributor

Summary

  • Add addition, subtraction, and unary negation directly to Quantity<TDimension>.
  • Preserve dimensions through those expressions and inferred local initialisers so subsequent multiplication and division can be generated.
  • Keep compiler-bound custom operator return types authoritative, with regression coverage.

Verification

  • Tests written before implementation.
  • All 452 tests pass: 315 core, 136 Roslyn, and 1 packaged-consumer integration test.
  • Formatting and diff checks pass (excluding the existing intentional RS1041 warning for the .NET 10 generator).
  • Independent production and test reviews completed, then repeated after fixes; no outstanding findings.
  • Explicit test-ownership and class-responsibility reviews completed.

Same-dimension operators live in the core generic type; no additional generated overloads are required.

@ScottishTapWater
ScottishTapWater merged commit af93d1f into main Oct 22, 2026
2 checks passed
@ScottishTapWater
ScottishTapWater deleted the feat/same-dimension-arithmetic branch October 22, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant