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

Several proto declarations of the same sub shouldn't be allowed in Rakudo #1205

Closed
p6rt opened this issue Aug 6, 2009 · 7 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Aug 6, 2009

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

Searchable as RT68242$

@p6rt
Copy link
Author

p6rt commented Aug 6, 2009

From @masak

Oh hai, it's me again. I just noticed that Rakudo a948cae5 doesn't
throw up its hands in disgust when seeing this​:

$ perl6 -e 'proto foo($bar) {}; proto foo($baz, $quux) {}'

TimToady is sitting here in the café, and he says implementations
shouldn't allow the above.

@p6rt
Copy link
Author

p6rt commented Aug 6, 2009

From @kyleha

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

commit ffe05f1314947976ea1508ff3d1908e6ab3e1a3a
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Thu Aug 6 21​:13​:20 2009 +0000

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

Inline Patch
diff --git a/t/spec/S06-multi/proto.t b/t/spec/S06-multi/proto.t
index d14ff9d..b910674 100644
--- a/t/spec/S06-multi/proto.t
+++ b/t/spec/S06-multi/proto.t
@@ -1,6 +1,6 @@
 use v6;
 use Test;
-plan 12;
+plan 13;
 
 # Test for proto definitions
 class A { }
@@ -49,3 +49,7 @@ is(foo(42),    1, 'dispatch with no possible candidates fell back to proto');
     multi prefix:<elk> ($arg) { $arg + 1 }
     is (elk 3), 4, "multi definition of prefix:<elk> works";
 }
+
+#?rakudo todo 'RT #68242'
+eval_dies_ok 'proto rt68242($a){};proto rt68242($c,$d){};',
+    'attempt to define two proto subs with the same name dies';

@p6rt
Copy link
Author

p6rt commented Aug 6, 2009

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

@p6rt
Copy link
Author

p6rt commented Sep 14, 2011

From @jnthn

On Thu Aug 06 05​:35​:52 2009, masak wrote​:

Oh hai, it's me again. I just noticed that Rakudo a948cae5 doesn't
throw up its hands in disgust when seeing this​:

$ perl6 -e 'proto foo($bar) {}; proto foo($baz, $quux) {}'

TimToady is sitting here in the caf�, and he says implementations
shouldn't allow the above.

Now​:

proto foo($bar) {}; proto foo($baz, $quux) {}
Illegal redeclaration of routine 'foo' at line 2

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Sep 14, 2011

From @tadzik

On Wed Sep 14 14​:17​:23 2011, jnthn@​jnthn.net wrote​:

Tagging testneeded.
Testadded in Raku/roast@b8d66dd49e, but rakudo
does not run that yet.

@p6rt
Copy link
Author

p6rt commented Sep 26, 2011

From @moritz

nom now runs this test file, and the test is un-TODO'ed, so I'm closing
this ticket now.

@p6rt
Copy link
Author

p6rt commented Sep 26, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant