Bugfix/domain primitive - #21
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.