Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created June 17, 2018 19:31
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 Whateverable/6abe100358c862114e4ae499686cffe7 to your computer and use it in GitHub Desktop.
Save Whateverable/6abe100358c862114e4ae499686cffe7 to your computer and use it in GitHub Desktop.
evalable6
use Test; class Ber::Meow {}; my \ClassDefs := 「my role Foo::Bar2[::T] {}; my class Ber::Meow2 {}; 」; throws-like ClassDefs ~ 「my Foo::Bar2[Ber::Meow2] constant mts7 = 42」, X::TypeCheck; EVAL ClassDefs ~ 「our Foo::Bar2[Ber::Meow2] constant ots7 = 42」;
(exit code 1)
1..2
not ok 1 - 'my role Foo::Bar2[::T] {}; my class Ber::Meow2 {}; my Foo::Bar2[Ber::Meow2] constant mts7 = 42' died
# Failed test ''my role Foo::Bar2[::T] {}; my class Ber::Meow2 {}; my Foo::Bar2[Ber::Meow2] constant mts7 = 42' died'
# at /tmp/Hvr6NwNjyd line 1
ok 2 - # SKIP Code did not die, can not check exception
# Looks like you failed 1 test of 2
not ok 1 - did we throws-like X::TypeCheck?
# Failed test 'did we throws-like X::TypeCheck?'
# at /tmp/Hvr6NwNjyd line 1
===SORRY!=== Error while compiling /home/bisectable/git/whateverable/EVAL_1
Redeclaration of symbol 'Ber::Meow2'
at /home/bisectable/git/whateverable/EVAL_1:1
------> e Foo::Bar2[::T] {}; my class Ber::Meow2⏏ {}; our Foo::Bar2[Ber::Meow2] constant
expecting any of:
generic role
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment