REPL doesn't see rules on << operator #130

Open
xfix opened this Issue Jun 3, 2012 · 1 comment

Comments

Projects
None yet
2 participants

xfix commented Jun 3, 2012

This REPL session doesn't see << operator.

niecza> class cout {}
cout()
niecza> sub infix:['<<'] ( cout $cout, Str $string ) { print $string; return $cout }
sub infix:<<<>(cout $cout, Str $string) { ... }
niecza> cout << 'zero'
===SORRY!===

Unsupported use of << to do left shift; in Perl 6 please use +< or ~< at (eval) line 1:
------> cout <<? 'zero'

Check failed

It doesn't happen when it's in file.

class cout {}

sub infix:['<<'] ( cout $cout, Str $string ) {
    print $string;
    return $cout;
}

cout << 'zero';
Owner

sorear commented Jun 25, 2012

Tracked this down to the exists_syntax check in batch_categoricals.

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