Skip to content

Commit

Permalink
Typecheck Attribute's build attribute against Code
Browse files Browse the repository at this point in the history
Attrbiute `build` of `Attrbiute` class can not only be set to a method
but to any kind of generic code. This fixes a breakage in `Red` ORM.
  • Loading branch information
vrurg committed Jan 29, 2020
1 parent b777d6f commit a8bb85a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Metamodel/BUILDPLAN.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ role Perl6::Metamodel::BUILDPLAN {

# compile check constants for correct type
if nqp::isconcrete($default) {
if $default.HOW.name($default) eq 'Method' {
if nqp::istype($default, $*W.find_symbol(["Code"])) {
# cannot typecheck code to be run later
}
elsif $primspec {
Expand Down

0 comments on commit a8bb85a

Please sign in to comment.