Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created November 25, 2015 17:05
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 jnthn/34266189529166caa286 to your computer and use it in GitHub Desktop.
Save jnthn/34266189529166caa286 to your computer and use it in GitHub Desktop.
diff --git a/src/Perl6/World.nqp b/src/Perl6/World.nqp
index 350d3f5..03e8336 100644
--- a/src/Perl6/World.nqp
+++ b/src/Perl6/World.nqp
@@ -1282,7 +1282,10 @@ class Perl6::World is HLL::World {
method build_container(%cont_info, $descriptor) {
my $cont;
my $cont_type := %cont_info<container_type>;
- if nqp::istype($cont_type, self.find_symbol(['Scalar'])) {
+ if %cont_info<build_ast> {
+ $cont := $cont_type;
+ }
+ elsif nqp::istype($cont_type, self.find_symbol(['Scalar'])) {
$cont := nqp::create($cont_type);
nqp::bindattr($cont, %cont_info<container_base>, '$!descriptor', $descriptor);
if nqp::existskey(%cont_info, 'scalar_value') {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment