Skip to content

Instantly share code, notes, and snippets.

@coke

coke/errors.md Secret

Last active March 16, 2023 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coke/2786e14b70166d055d9e87bda6e80367 to your computer and use it in GitHub Desktop.
Save coke/2786e14b70166d055d9e87bda6e80367 to your computer and use it in GitHub Desktop.
RAKUAST Exception type mismatches
RAKUDO_RAKUAST=1 install/bin/raku t/05-messages/01-errors.t

throws-like 「use v5」, X::Language::Unsupported,
    '`use v5` in code does not try to load non-existent modules';

    # Expected: X::Language::Unsupported
    # Got:      X::AdHoc


RAKUDO_RAKUAST=1 install/bin/raku t/spec/MISC/bug-coverage-6.d.t

throws-like 「
    use v6.d;
    sub foo { whenever Promise.in(2) { say ‘hello’ } }; react foo
」, X::Comp::WheneverOutOfScope, 'whenever not in lexical scope of react throws';

    # Expected: X::Comp::WheneverOutOfScope
    # Got:      X::Syntax::Confused
    

RAKUDO_RAKUAST=1 install/bin/raku  t/spec/APPENDICES/A02-some-day-maybe/misc.t    

    # Expected: X::Syntax::Adverb
    # Got:      X::Method::NotFound
    
        # Expected: X::TypeCheck::Attribute::Default
        # Got:      X::TypeCheck::Assignment  
        
        # Expected: X::Parameter::Default
        # Got:      X::AdHoc        
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment