Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constructor not found for LanguageExt.LongRange #1314

Open
pilotMike opened this issue Apr 6, 2024 · 1 comment
Open

Constructor not found for LanguageExt.LongRange #1314

pilotMike opened this issue Apr 6, 2024 · 1 comment

Comments

@pilotMike
Copy link

Executing LongRange.FromMinMax(50, 99, 1) throws an exception with "The type initializer for LanguageExt.Range`3 threw an exception" with the inner exception being that the constructor wasn't found for LongRange.

IntegerRange works fine.

creating one's own type, ie class MyLongRange(int start, int end, int step) : Range<MyLongRange, TLong, long>(from, to, step) works fine.

@louthy
Copy link
Owner

louthy commented Apr 6, 2024

I'm assuming this is pre-v5, as v5 range has been refactored into a single Range type -- my advice would be to create your own Range type for the element-type that fails or you could grab the latest code from the v5-transducers branch and copy it into your own project until you're ready to upgrade to v5.

Even though the branch is officially 'alpha', the Range type is super simple and has good unit test coverage - so I'm confident of its soundness.

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

No branches or pull requests

2 participants