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

Type checking should have a friendly error for partial applied constructors #7746

Closed
jdunkerley opened this issue Sep 6, 2023 · 2 comments
Closed
Assignees

Comments

@jdunkerley
Copy link
Member

jdunkerley commented Sep 6, 2023

Goal one:
If I have a constructor with missing required fields but of the correct type for the function, we want to have a friendly error message.

Stretch:
Allow constructors of types which are convertible to target type to also have friendlier messages.

Idea is something like Filter_Condition type checking where we have a function passed then have to approve.

@jdunkerley jdunkerley converted this from a draft issue Sep 6, 2023
@jdunkerley jdunkerley changed the title Type checking should allow partial applied constructors Type checking should have a friendly error for partial applied constructors Sep 6, 2023
@jdunkerley jdunkerley moved this from ❓New to 📤 Backlog in Issues Board Sep 6, 2023
@JaroslavTulach
Copy link
Member

following program:

from Standard.Base import all

type Complex
    Value a b c d

process (c:Complex) = c.a+c.b+c.c+c.d

main = process (Complex.Value 1 2 3)

yields

Type error: expected `c` to be Complex, but got Complex.Value[t.enso:4:5-17] a=1 b=2 c=3 d=_. Try to apply d argument.

Isn't that user friendly enough error message?

@github-project-automation github-project-automation bot moved this from 📤 Backlog to 🟢 Accepted in Issues Board Sep 6, 2023
@enso-bot
Copy link

enso-bot bot commented Sep 7, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-09-06):

Progress: - evaluating and closing: #7746 (comment)

Next Day: Bugfixing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants