This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
has $.val; | |
method Numeric { $.val }; | |
method succ { say "DEBUG: method succ was called"; A.new( val => $.val+1) }; | |
method pred { say "DEBUG: method pred was called"; A.new( val => $.val-1) }; | |
} | |
multi sub infix:<cmp> (A $x, Int $n) { $x.val cmp $n }; | |
multi sub infix:<cmp> (A $x, A $y) { $x.val cmp $y.val }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl6-j --ll-exception -e '"a" ~~ /"$0"/' | |
Cannot unbox a type object | |
in warn (gen/jvm/CORE.setting:811) | |
in warn (gen/jvm/CORE.setting:807) | |
in Str (gen/jvm/CORE.setting:1212) | |
in Str (gen/jvm/CORE.setting:1208) | |
in Stringy (gen/jvm/CORE.setting:1222) | |
in Stringy (gen/jvm/CORE.setting:1219) | |
in infix:<~> (gen/jvm/CORE.setting:1649) | |
in infix:<~> (gen/jvm/CORE.setting:1647) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl6-j -e 'say "a" ~~ /"$0"/' | |
{:file("gen/jvm/CORE.setting"), :line(9411)}<> | |
{:file("gen/jvm/CORE.setting")}<> | |
{:file("gen/jvm/CORE.setting")}<> | |
{:file("gen/jvm/CORE.setting")}<> | |
{:file("gen/jvm/CORE.setting")}<> | |
{:file("gen/jvm/CORE.setting")}<> | |
{:file("gen/jvm/CORE.setting")}<> | |
{:file("gen/jvm/CORE.setting")}<> | |
{:file("gen/jvm/CORE.setting")}<> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Block.pm b/src/core/Block.pm | |
index 8e78e82..dbf937e 100644 | |
--- a/src/core/Block.pm | |
+++ b/src/core/Block.pm | |
@@ -36,6 +36,7 @@ my class Block { # declared in BOOTSTRAP | |
} | |
method assuming(Block:D $b: |curried) { | |
+ 1; | |
anon sub CURRIED (|direct) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ viv -e 'my @foo; my $exists = @foo[0]:exists;' | |
VAST::comp_unit, BEG: 0, END: 38 | |
│ └─LEX: !!perl/hash:Stash | |
│ '!file': &1 | |
│ name: (eval) | |
│ '!id': &2 | |
│ - MY:file<(eval)> | |
│ '!line': 0 | |
│ $!: !!perl/hash:NAME | |
│ dynamic: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Str.pm b/src/core/Str.pm | |
index 4b9fdb0..5cf4dcd 100644 | |
--- a/src/core/Str.pm | |
+++ b/src/core/Str.pm | |
@@ -907,7 +907,7 @@ my class Str does Stringy { # declared in BOOTSTRAP | |
$!todo = $!todo - 1; | |
my int $found = nqp::index($!string,$!match,$!pos); | |
$found < 0 | |
- ?? $!todo = 0 | |
+ ?? ($!todo = 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stage parse : Error while constructing error object:Could not locate compile-time value for symbol X::Syntax::ConditionalOperator::PrecedenceTooLoose | |
Error while compiling, type X::Syntax::ConditionalOperator::PrecedenceTooLoose | |
operator: = | |
at line 9861, near "?? $!todo " | |
in panic (gen/jvm/stage2/NQPHLL.nqp:399) | |
in typed_exception (src/Perl6/World.nqp:3812) | |
in throw (src/Perl6/World.nqp:3623) | |
in typed_panic (src/Perl6/Grammar.nqp:240) | |
in infix:sym<?? !!> (src/Perl6/Grammar.nqp:4194) | |
in !protoregex (gen/jvm/stage2/QRegex.nqp:1350) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Failure.pm b/src/core/Failure.pm | |
index 70aa7be..4a7baff 100644 | |
--- a/src/core/Failure.pm | |
+++ b/src/core/Failure.pm | |
@@ -56,7 +56,7 @@ my class Failure { | |
multi method Str(Failure:D:) { $!handled ?? $.mess !! self!throw(); } | |
multi method gist(Failure:D:) { $!handled ?? $.mess !! self!throw(); } | |
method mess (Failure:D:) { | |
- "(HANDLED) " x $!handled ~ self.exception.message ~ "\n" ~ self.backtrace; | |
+ "(HANDLED) " x ($!handled ?? $!handled !! 0) ~ self.exception.message ~ "\n" ~ self.backtrace; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With the following changes I'm able to build rakudo.jvm on commit a2a34c26 | |
The code I had to work around was modified by these three commits | |
* 5349d05c | |
* ad08a1d7 | |
* cc4d72c4 | |
$ git diff | |
diff --git a/src/core/Failure.pm b/src/core/Failure.pm | |
index 76ad01f..6d45344 100644 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use nqp; | |
my \iter = (3,2,1,4).iterator; | |
my \sort-buffer = IterationBuffer.new; | |
unless iter.push-until-lazy(sort-buffer) =:= IterationEnd { | |
fail X::Cannot::Lazy.new(:action<sort>); | |
} | |
my int $i = 0; | |
my int $n = sort-buffer.elems; |