Fix toArray and toList causing compilation errors#122
Open
jwosty wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Hmm. Seems it breaks some usages. For the record, I'm doing using selectAsync {
for x in table do
select x
mapSeq (
// ...
)
toList
} |
Owner
|
Hi John! I was able to recreate your issue. This also fails to build for me: let! results =
selectAsync openContext {
for p in Person.Person do
mapSeq $"{p.LastName}, {p.FirstName}"
toList
}
}But the intended approach is to replace let! results =
selectAsync openContext {
for p in Person.Person do
mapList $"{p.LastName}, {p.FirstName}"
}You may also include let! results =
selectAsync openContext {
for p in Person.Person do
select (p.LastName, p.FirstName) into selected
mapList (
let lname, fname = selected
$"{lname}, {fname}"
)
} |
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.
Not sure if I'm doing something wrong, but
toArrayandtoListin select expressions cause type mismatch errors for me whenever I try to use them.I've tried this tiny little fix in my own codebase and it typechecks. It looks like more functions need fixing though. And I am also not sure how but
mapSeqworks in my code even though it appears to have the same issue...?