Last active
August 22, 2017 16:10
-
-
Save ugexe/31e22b5924319f502f62970fca34e3a0 to your computer and use it in GitHub Desktop.
Why are these changes not equivalent?
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
$ git diff | |
diff --git a/src/QRegex/Cursor.nqp b/src/QRegex/Cursor.nqp | |
index b10804c9f..767d79f3c 100644 | |
--- a/src/QRegex/Cursor.nqp | |
+++ b/src/QRegex/Cursor.nqp | |
@@ -87,11 +87,11 @@ role NQPMatchRole is export { | |
method to() { $!to < 0 ?? $!pos !! $!to } | |
method CURSOR() { self } | |
method PRECURSOR() { self."!cursor_init"(nqp::getattr($!shared, ParseShared, '$!target'), :p($!from)) } | |
- method Str() { $!pos >= $!from ?? nqp::substr(nqp::getattr($!shared, ParseShared, '$!target'), $!from, nqp::sub_i(self.to, $!from)) !! '' } | |
+ method Str() { $!pos >= $!from ?? nqp::substr(nqp::getattr($!shared, ParseShared, '$!target'), $!from, (($!to < 0 ?? $!pos !! $!to) - $!from)) !! '' } | |
method Int() { my int $i := +self.Str(); $i } # XXX need a better way to do this | |
method Num() { +self.Str() } | |
method Bool() { $!pos >= $!from } | |
- method chars() { $!pos >= $!from ?? nqp::sub_i(self.to, $!from) !! 0 } | |
+ method chars() { $!pos >= $!from ?? (($!to < 0 ?? $!pos !! $!to) - $!from) !! 0 } | |
method make($made) { $!made := $made } | |
method made() { $!made } |
$ install/bin/perl6 --ll-exception t/spec/S05-transliteration/79778.t
1..1
This type cannot unbox to a native integer: P6opaque, Num
at SETTING::src/core/Str.pm:2378 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:increment_index)
from SETTING::src/core/Str.pm:2478 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:next_substitution)
from SETTING::src/core/Str.pm:2490 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:result)
from SETTING::src/core/Str.pm:2609 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:trans)
from SETTING::src/core/Str.pm:2256 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:trans)
from SETTING::src/core/Str.pm:2262 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:trans)
from SETTING::src/core/Str.pm:2256 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:trans)
from t/spec/S05-transliteration/79778.t:6 (<ephemeral file>:<unit>)
from t/spec/S05-transliteration/79778.t:1 (<ephemeral file>:<unit-outer>)
from gen/moar/stage2/NQPHLL.nqp:1608 (/Users/ugexe/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:eval)
from gen/moar/stage2/NQPHLL.nqp:1830 (/Users/ugexe/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:evalfiles)
from gen/moar/stage2/NQPHLL.nqp:1755 (/Users/ugexe/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from src/Perl6/Compiler.nqp:42 (/Users/ugexe/repos/rakudo/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:1696 (/Users/ugexe/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/main.nqp:47 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/perl6.moarvm:MAIN)
from gen/moar/main.nqp:38 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/perl6.moarvm:<mainline>)
from <unknown>:1 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/perl6.moarvm:<main>)
from <unknown>:1 (/Users/ugexe/repos/rakudo/install/share/perl6/runtime/perl6.moarvm:<entry>)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
...but does begin passing tests for Grammar::HTTP