Skip to content

Commit

Permalink
Only add constant folded results to the current SC if they don't have…
Browse files Browse the repository at this point in the history
… one.

This fixes a bug on JVM where the Attribute type object gets reassigned to the
CORE.setting serialization context (from BOOTSTRAP.nqp), which broke
runtime-creation of Attributes due to an SC-mismatch during Attribute attribute
lookup.
  • Loading branch information
peschwa committed Oct 22, 2015
1 parent 582661f commit cc67265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/World.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -2406,7 +2406,7 @@ class Perl6::World is HLL::World {
# Adds the result of a constant folding operation to the SC and
# returns a reference to it.
method add_constant_folded_result($r) {
self.add_object($r);
self.add_object_if_no_sc($r);
QAST::WVal.new( :value($r) )
}

Expand Down

0 comments on commit cc67265

Please sign in to comment.