X-Sharp / XSharpPublic

Public repository for the source code for the XSharp Compiler, Runtime, Project System and Tools.
Apache License 2.0
89 stars 36 forks source link

Linq Min/Max function of float wrong #1482

Open hpetriffer opened 3 weeks ago

hpetriffer commented 3 weeks ago

The implementation of the Linq min/max function in https://github.com/X-Sharp/XSharpPublic/blame/main/src/Runtime/XSharp.RT/Functions/ExtensionMethods.prg is wrong. It calculates always a sum

Hansjörg

RobertvanderHulst commented 3 weeks ago

Hansjörg, Good catch. That's what happens if you copy-paste code, AND do not write unit tests for it. I'll fix the issue and will write the unit tests.

RobertvanderHulst commented 3 weeks ago

I see that only the extension methods that take a selector are incorrect. We indeed did not have unit tests for these.