Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec]: Added test for RT 65224 class name as string unexpectedly w…

…orks

git-svn-id: http://svn.pugscode.org/pugs@31211 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 604c64120de7e7f11f379820c8e2b9b8d157217c 1 parent b6878a0
radus authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 S12-class/instantiate.t
View
14 S12-class/instantiate.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 6;
+plan 7;
# L<S12/Construction and Initialization>
# Basic instantiation.
@@ -34,4 +34,16 @@ is($foo2.check(), 42, 'initializing attributes in new');
'error for "NoSuch::Subclass.new()" mentions NoSuch::Subclass';
}
+# RT 65224
+
+#instantiation from class name unexpectedly creates a class object instead of Str object
+
+{
+ class Foo { };
+ my $x = 'Foo';
+ my $y = $x.new;
+ #?rakudo todo 'instantiating from class name string unexpectedly creates a class object'
+ is($y.WHAT, Str, "instantiating from class name string creates a Str object");
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.