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

Can't introspect constants in signatures #1407

Closed
p6rt opened this issue Nov 22, 2009 · 5 comments
Closed

Can't introspect constants in signatures #1407

p6rt opened this issue Nov 22, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Nov 22, 2009

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

Searchable as RT70720$

@p6rt
Copy link
Author

p6rt commented Nov 22, 2009

From lewis@wall.org

[20​:20] <quietfanatic> rakudo​: say :(3).perl
[20​:20] <+p6eval> rakudo 7347ec​: :(Int :​:TYPE_CAPTURE20 where all({ ... }))␤

I can't find a '3' anywhere inside that expression, or in any of the methods
on the Parameter object. I want my 3 back!

@p6rt
Copy link
Author

p6rt commented May 31, 2010

From @moritz

21​:48 <@​moritz_> rakudo​: say :(3).params[0].constraints
21​:48 <+p6eval> rakudo 4f9ca4​: OUTPUT«3␤»

Isn't that pretty? :-)

@p6rt
Copy link
Author

p6rt commented May 31, 2010

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

@p6rt
Copy link
Author

p6rt commented May 31, 2010

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

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

p6rt commented May 31, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S06-signature/introspection.t

commit 4fe2085a03c1029dc2361275a6d50fd4d8cbd8d3
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Mon May 31 19​:50​:56 2010 +0000

  [t/spec] Test for RT #​70720, :(3) has the 3 available to introspection
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31031 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S06-signature/introspection.t b/t/spec/S06-signature/introspection.t
index dc4e9bb..bb2adf3 100644
--- a/t/spec/S06-signature/introspection.t
+++ b/t/spec/S06-signature/introspection.t
@@ -88,6 +88,12 @@ sub j(*@i) {
        'smartmach against non-closure constraint (-)';
 }
 
+# RT #70720
+{
+    is :(3).params[0].constraints, 3, ':(3) contains the 3';
+    ok :(3).params[0].type === Int,   ':(3) has a parameter of type Int';
+}
+
 {
     sub h(::T $x, T $y) { };
     my @l = &h.signature.params;

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

No branches or pull requests

1 participant