Created
October 14, 2017 13:13
-
-
Save zoffixznet/19825d7c42479982d27eeab33f0c3b01 to your computer and use it in GitHub Desktop.
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
zoffix@VirtualBox~/CPANPRC/rakudo (nom)$ ./perl6 -e 'int32.new: 42' | |
Cannot instantiate native type | |
in block <unit> at -e line 1 | |
zoffix@VirtualBox~/CPANPRC/rakudo (nom)$ gd | |
diff --git a/src/Perl6/Metamodel/NativeHOW.nqp b/src/Perl6/Metamodel/NativeHOW.nqp | |
index 5d2a22e..70e3c68 100644 | |
--- a/src/Perl6/Metamodel/NativeHOW.nqp | |
+++ b/src/Perl6/Metamodel/NativeHOW.nqp | |
@@ -113,6 +113,10 @@ class Perl6::Metamodel::NativeHOW | |
$!unsigned | |
} | |
- method method_table($obj) { nqp::hash() } | |
+ method method_table($obj) { | |
+ nqp::hash('new', | |
+ nqp::getstaticcode(sub (*@_,*%_) { | |
+ nqp::die('Cannot instantiate native type') })) | |
+ } | |
method submethod_table($obj) { nqp::hash() } | |
} | |
zoffix@VirtualBox~/CPANPRC/rakudo (nom)$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment