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

parser, checker: move error handling for any type to the checker to resolve parsing issues #21146

Merged
merged 4 commits into from
Mar 30, 2024

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Mar 29, 2024

This can be a checker error. The type error during parsing causes parsing interruption and internal errors. E.g.:

// any.v
type Any = any
v fmt any.v
error: cannot use `any` type here
    1 | type Any = any
      |            ~~~

Internal vfmt error while formatting file: any.v.

similar to how type MyType = unknown_type is treated

@ttytm ttytm marked this pull request as draft March 29, 2024 22:32
@ttytm ttytm marked this pull request as ready for review March 29, 2024 22:35
@ttytm ttytm force-pushed the checker/any-error branch 3 times, most recently from 22d1476 to 7c25876 Compare March 29, 2024 23:02
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@spytheman spytheman merged commit b97fe68 into vlang:master Mar 30, 2024
54 checks passed
@JalonSolov
Copy link
Contributor

V still has any? I thought it was decided that that was going away...

@ttytm ttytm deleted the checker/any-error branch March 30, 2024 14:28
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

Successfully merging this pull request may close these issues.

None yet

3 participants