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

Adding friendly error for when needs misses a type declaration #907

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

jwoertink
Copy link
Member

Purpose

fixes #864

Description

This will now throw a compile-time error if you use needs without a proper type declaration like needs title : String.

Here's an example of what it looks like.
Screen Shot 2019-09-17 at 11 29 51 AM

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

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

Love it!

@paulcsmith paulcsmith merged commit 759b349 into master Sep 17, 2019
@paulcsmith paulcsmith deleted the issues/864 branch September 17, 2019 19:24
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.

Missing a type on a form's needs should produce a better error
2 participants