Skip to content

Bugfix/domain primitive - #21

Merged
temonk merged 7 commits into
mainfrom
bugfix/DomainPrimitive
Aug 3, 2026
Merged

Bugfix/domain primitive#21
temonk merged 7 commits into
mainfrom
bugfix/DomainPrimitive

Conversation

@temonk

@temonk temonk commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
  • DomainPrimitive Declaration error fixed.

  • SimpraNumber.Equals(object) checked 'obj is SimpraDate' instead of
    'obj is SimpraNumber' (copy-paste error), breaking default equality
    for boxed SimpraNumber. This silently broke the 'any in'/'all in'/
    'any not in'/'all not in' operators and list '-'/'-=' for numeric
    lists, since they rely on List.Contains/Remove/Except.

  • number(SimpraString), number(SimpraBool), and date(SimpraString)
    constructed their result unconditionally instead of checking
    HasValue first, unlike round/abs/sum/substring. A no-value source
    string threw FormatException instead of propagating no-value.

  • SimpraNumber's nullable numeric conversion operators (int?, long?,
    decimal?, etc.) never checked HasValue, always returning the
    default (0) instead of null - inconsistent with SimpraDate,
    SimpraBool, SimpraString, and SimpraNumber's own bool? operator.

  • CallFunction converted each call argument using the caller-side
    unwrapped argument type (used only for FindBestMatch overload
    scoring) instead of the resolved method's actual declared
    parameter type. Calling an external function with a non-decimal
    numeric parameter (e.g. int, long) threw ArgumentException at
    compile time instead of working.

Temo Nikolaishvili added 7 commits August 3, 2026 10:55
…ssion engine

- SimpraNumber.Equals(object) checked 'obj is SimpraDate' instead of
  'obj is SimpraNumber' (copy-paste error), breaking default equality
  for boxed SimpraNumber. This silently broke the 'any in'/'all in'/
  'any not in'/'all not in' operators and list '-'/'-=' for numeric
  lists, since they rely on List<T>.Contains/Remove/Except.

- number(SimpraString), number(SimpraBool), and date(SimpraString)
  constructed their result unconditionally instead of checking
  HasValue first, unlike round/abs/sum/substring. A no-value source
  string threw FormatException instead of propagating no-value.

- SimpraNumber's nullable numeric conversion operators (int?, long?,
  decimal?, etc.) never checked HasValue, always returning the
  default (0) instead of null - inconsistent with SimpraDate,
  SimpraBool, SimpraString, and SimpraNumber's own bool? operator.

- CallFunction converted each call argument using the caller-side
  unwrapped argument type (used only for FindBestMatch overload
  scoring) instead of the resolved method's actual declared
  parameter type. Calling an external function with a non-decimal
  numeric parameter (e.g. int, long) threw ArgumentException at
  compile time instead of working.

Un-skips the 7 regression tests added to document these bugs; full
suite is green with no skips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@temonk
temonk merged commit 62e4a4f into main Aug 3, 2026
1 of 2 checks passed
@temonk
temonk deleted the bugfix/DomainPrimitive branch August 3, 2026 09:25
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.

2 participants