Skip to content

checker: fix $tmpl function type mismatch - #18826

Merged
spytheman merged 3 commits into
vlang:masterfrom
Delta456:tmpl_type_mismatch_err
Jul 9, 2023
Merged

spytheman merged 3 commits into
vlang:masterfrom
Delta456:tmpl_type_mismatch_err

Conversation

@Delta456

@Delta456 Delta456 commented Jul 9, 2023 •

Copy link
Copy Markdown
Member

Closes #18309

πŸ€– Generated by Copilot at 29c5a6f

This pull request adds a feature that allows using templates in V code, and a type check for the return value of the $tmpl comptime function. It also adds a test case and a template file to verify the feature and the check.

πŸ€– Generated by Copilot at 29c5a6f

  • Add a type check for the return argument of $tmpl comptime function (link)
  • Add a test case for the type check in template_type_mismatch_err.out and template_type_mismatch_err.vv (link, link)

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good work.

@spytheman
spytheman merged commit 0498f4c into vlang:master Jul 9, 2023
@Delta456
Delta456 deleted the tmpl_type_mismatch_err branch July 9, 2023 16:43
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.

non-standard error message when incorrectly returning a template string from a function

2 participants