8000 Scalar `yield` after singleton record `yield` throws "Conversion to core did not preserve type" · Issue #263 · hydromatic/morel · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Scalar yield after singleton record yield throws "Conversion to core did not preserve type" #263

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

Closed
julianhyde opened this issue May 2, 2025 · 1 comment

Comments

@julianhyde
Copy link
Collaborator

Scalar yield after record yield throws "Conversion to core did not preserve type".

from i in [1, 2, 3, 4, 5, 6],
    j in [1, 2, 3, 4, 5, 6]
  yield {x = i + j}
  yield x;

gives

Conversion to core did not preserve type: expected [int list] actual [{x:int} list] from [from i_8 in [1, 2, 3, 4, 5, 6] join j_8 in [1, 2, 3, 4, 5, 6] yield {x = i_8 + j_8}]

The problem is that FromBuilder thinks the second yield is trivial, and removes it, but actually it affects the result type of the query.

@julianhyde julianhyde changed the title Scalar yield after record yield throws "Conversion to core did not preserve type" Scalar yield after singleton record yield throws "Conversion to core did not preserve type" May 2, 2025
@julianhyde
Copy link
Collaborator Author

Fixed in 5802238. (The commit message erroneously referenced #253.)

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

1 participant
0