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

Bare 'i' not recognised as a Complex() #2012

Closed
p6rt opened this issue Aug 4, 2010 · 5 comments
Closed

Bare 'i' not recognised as a Complex() #2012

p6rt opened this issue Aug 4, 2010 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 4, 2010

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

Searchable as RT76994$

@p6rt
Copy link
Author

p6rt commented Aug 4, 2010

From @tadzik

When 'i' is not prefixed by a number it's not recognised as a Complex
number.

5i.WHAT
Complex()
i.WHAT
Could not find sub &i

i.WHAT is ok for the std evalbot on #perl6, but it's not for Rakudo.
Same happens for e.g. (2 + i).

@p6rt
Copy link
Author

p6rt commented Aug 5, 2010

From @pmichaud

Now fixed in b627e33. Assigning to moritz for spectest verification.

Thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Aug 5, 2010

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

@p6rt
Copy link
Author

p6rt commented Aug 8, 2010

From @kyleha

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

commit 94aae584b085c473fd3ac16186612e010edd6fd7
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sun Aug 8 12​:35​:08 2010 +0000

  [t/spec] test for RT #​76994, bare i is the complex unit
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31928 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S32-num/complex.t b/t/spec/S32-num/complex.t
index 2523e8c..a8aa015 100644
--- a/t/spec/S32-num/complex.t
+++ b/t/spec/S32-num/complex.t
@@ -7,6 +7,8 @@ plan *;
 # Basic tests functions specific to complex numbers.
 
 isa_ok(1 + 2i, Complex, 'postfix:<i> creates a Complex number');
+isa_ok(i, Complex, 'i creates a Complex number');
+ok i == 1i, '1 == 1i';
 
 is_approx((2i)i, -2, 'postfix:<i> works on an imaginary number');
 is_approx((2i + 3)i, -2 + 3i, 'postfix:<i> works on a Complex number');

@p6rt
Copy link
Author

p6rt commented Aug 11, 2010

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

@p6rt p6rt closed this as completed Aug 11, 2010
@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