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

Rakudo doesn't catch use of non-predeclared variables in routine signatures #1526

Closed
p6rt opened this issue Feb 19, 2010 · 7 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Feb 19, 2010

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

Searchable as RT72948$

@p6rt
Copy link
Author

p6rt commented Feb 19, 2010

From @masak

<jnthn> rakudo​: sub foo($x where { $x == $y }, $y) { }; foo(1,2)
<p6eval> rakudo 3704a2​: OUTPUT«No applicable candidates found to
dispatch to for 'infix​:<==>'␤current instr.​: '_block51' pc 434
(EVAL_1​:170)␤»
<masak> jnthn​: no, 'until' is '!while'.
<jnthn> masak​: Ah, ok
<jnthn> Then error makes sense I guess.
<masak> aye.
* masak submits a LTA rakudobug for that last one :)
<masak> std​: sub foo($x where { $x == $y }, $y) { }
<p6eval> std 29780​: OUTPUT«Potential difficulties​:␤ Variable $y is
not predeclared [...] ok 00​:01 110m␤»
<masak> that's a lot better.
<jnthn> Yeah

@p6rt
Copy link
Author

p6rt commented Aug 3, 2010

From @bbkr

on * build

$ perl6 -e 'sub foo($x where { $x == $y }, $y) { }; foo(1,2)'
Use of uninitialized value in numeric context
Constraint type check failed for parameter '$x'
  in 'foo' at line 1
  in main program body at line 1

@p6rt
Copy link
Author

p6rt commented Aug 3, 2010

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

@p6rt
Copy link
Author

p6rt commented Sep 13, 2011

From @bbkr

NOM​: Message is now even more LTA, $y is confused in naming with $b

bbkr​:nom bbkr$ ./perl6 -e 'sub foo($x where { $x == $y }, $y) { }; foo(1,2)'
Nominal type check failed for parameter '$b'; expected Any but got Mu
instead
  in sub infix​:<==> at src/gen/CORE.setting​:1904
  in method ACCEPTS at src/gen/CORE.setting​:1073

@p6rt
Copy link
Author

p6rt commented Apr 5, 2012

From @jnthn

On Tue Sep 13 07​:10​:10 2011, bbkr wrote​:

NOM​: Message is now even more LTA, $y is confused in naming with $b

bbkr​:nom bbkr$ ./perl6 -e 'sub foo($x where { $x == $y }, $y) { };
foo(1,2)'
Nominal type check failed for parameter '$b'; expected Any but got Mu
instead
in sub infix​:<==> at src/gen/CORE.setting​:1904
in method ACCEPTS at src/gen/CORE.setting​:1073

Now​:

C​:\consulting\rakudo>perl6 -e "sub foo($x where { $x == $y }, $y) { };
foo(1,2)"
===SORRY!===
Variable $y is not declared
at -e​:1

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jul 15, 2012

From @bbkr

Test in

Raku/roast@ae8bd0a393

@p6rt
Copy link
Author

p6rt commented Jul 15, 2012

@bbkr - 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