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

error message on constraint violation #5021

Open
p6rt opened this issue Jan 7, 2016 · 1 comment
Open

error message on constraint violation #5021

p6rt opened this issue Jan 7, 2016 · 1 comment
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Jan 7, 2016

Migrated from rt.perl.org#127209 (status was 'new')

Searchable as RT127209$

@p6rt
Copy link
Author

p6rt commented Jan 7, 2016

From @Ovid

This code​:
    class Foo { subset Limit of Rat where -10 .. 10; has Limit $.x is rw }; Foo.new( x => 15.0 ); 
 Produces the following error​:
    Type check failed in assignment to $!x; expected Foo​::Limit but got Rat
As a dev, I would like to know that it's the constraint that failed, but the code implies that a Rat is wrong (which is correct, but misleading to me).
Best,Ovid-- IT consulting, training, specializing in Perl, databases, and agile developmenthttp://www.allaroundtheworld.fr/. 
Buy my book! - http://bit.ly/beginning_perl

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant