Permalink
Browse files

Merge pull request #1080 from MasterDuke17/tests_for_RT122232

Test instantiating non-class has its name in error
  • Loading branch information...
zoffixznet committed May 10, 2017
2 parents 2df7060 + 4666505 commit 6435933a1d415968c3ece66333e473114fa07782
Showing with 12 additions and 0 deletions.
  1. +12 −0 t/05-messages/01-errors.t
View
@@ -113,6 +113,18 @@ for <fail die throw rethrow resume> -> $meth {
'sinking to a code object in a feed suggests calling the routine';
}
# RT #122232
{
throws-like { class A::B {}; A.new },
Exception,
message => /<<'A'>>/,
'trying to instantiate a non-class gives the name in the error';
throws-like { subset Foo of Int where * > 42; Foo.new },
Exception,
message => /<<'Foo'>>/,
'trying to instantiate a non-class gives the name in the error';
}
done-testing;
# vim: ft=perl6 expandtab sw=4

0 comments on commit 6435933

Please sign in to comment.