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 mentions $!tai ( Duration.new(∞) ) #5074

Closed
p6rt opened this issue Jan 21, 2016 · 6 comments
Closed

error message mentions $!tai ( Duration.new(∞) ) #5074

p6rt opened this issue Jan 21, 2016 · 6 comments
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded

Comments

@p6rt
Copy link

p6rt commented Jan 21, 2016

Migrated from rt.perl.org#127341 (status was 'resolved')

Searchable as RT127341$

@p6rt
Copy link
Author

p6rt commented Jan 21, 2016

From @AlexDaniel

Code​:
my $x = Duration.new(�)

Result​:
Type check failed in assignment to $!tai; expected Rat but got Num
  in block <unit> at -e line 1

Sure, it could error out on �, but it should not mention some internal
variables that are not in my code (especially if the name is so
meaningless).

@p6rt
Copy link
Author

p6rt commented Mar 9, 2016

From @skids

Another interesting way to elicit this message​:

$ perl6 -e 'use MONKEY-SEE-NO-EVAL; for 1..10 { EVAL "say " ~ ("now - now" xx $_).join(" + ") }'
-0.0014496
-0.000669746420365
-0.001511655833083175
-0.00138699364837723214
Type check failed in assignment to $!tai; expected Rat but got Num (1457491002.82177e0)
  in block <unit> at EVAL_4 line 1
  in block <unit> at -e line 1

@p6rt
Copy link
Author

p6rt commented Mar 9, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 5, 2017

From @AlexDaniel

This was changed in rakudo/rakudo@fb5db59

… and now you can use anything, even NaN.

Assuming that this behavior is right, testneeded.

See also​: Raku/doc#1589

On 2016-01-21 12​:04​:33, alex.jakimenko@​gmail.com wrote​:

Code​:
my $x = Duration.new(∞)

Result​:
Type check failed in assignment to $!tai; expected Rat but got Num
in block <unit> at -e line 1

Sure, it could error out on ∞, but it should not mention some internal
variables that are not in my code (especially if the name is so
meaningless).

@p6rt
Copy link
Author

p6rt commented Oct 11, 2017

@p6rt
Copy link
Author

p6rt commented Oct 11, 2017

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Oct 11, 2017
@p6rt p6rt added LTA Less Than Awesome; typically an error message that could be better testneeded labels 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 testneeded
Projects
None yet
Development

No branches or pull requests

1 participant