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

Rat + 0.1 dies in Rakudo #1718

Closed
p6rt opened this issue Apr 23, 2010 · 4 comments
Closed

Rat + 0.1 dies in Rakudo #1718

p6rt opened this issue Apr 23, 2010 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 23, 2010

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

Searchable as RT74626$

@p6rt
Copy link
Author

p6rt commented Apr 23, 2010

From @masak

<sorear> rakudo​: my Rat $a; $a += 0.1 for ^10
<p6eval> rakudo a1159c​: OUTPUT«Type objects are abstract and have no
attributes, but you tried to access [...]
* masak submits rakudobug for Rat + 0.1 dying
<masak> rakudo​: Rat + 0.1
<p6eval> rakudo a1159c​: OUTPUT«Type objects are abstract and have no
attributes, but you tried to access [...]

@p6rt
Copy link
Author

p6rt commented May 30, 2010

From @moritz

This has been working for quite some time, and is now also tested in rat.t.

@p6rt
Copy link
Author

p6rt commented May 30, 2010

@moritz - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed May 30, 2010
@p6rt
Copy link
Author

p6rt commented May 30, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S32-num/rat.t

commit f9b04c54f7520839f8e42e4f2839377deb629c5d
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sun May 30 20​:27​:26 2010 +0000

  [t/spec] test for RT #​74626
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31002 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S32-num/rat.t b/t/spec/S32-num/rat.t
index 0917474..9fea51b 100644
--- a/t/spec/S32-num/rat.t
+++ b/t/spec/S32-num/rat.t
@@ -209,6 +209,12 @@ is (-42/0).Num, -Inf, "(-42/0).Num = -Inf";
 
 ok Rat.new() == 0, 'Rat.new() is 0';
 
+{
+    my Rat $a;
+    $a += 0.1 for ^10;
+    ok $a == 1, 'can do += on variable initialized by type object';
+}
+
 done_testing;
 
 # vim: ft=perl6

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant