Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix explosions when trying to sink typevars.
  • Loading branch information
jnthn committed Dec 9, 2012
1 parent c481a55 commit 63659db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions src/Perl6/Actions.pm
Expand Up @@ -56,13 +56,18 @@ class Perl6::Actions is HLL::Actions does STDActions {
),
QAST::Op.new(:op<if>,
QAST::Op.new(:op<if>,
QAST::Op.new(:op<defined>,
QAST::Op.new(:op<isconcrete>,
QAST::Var.new(:$name, :scope<local>),
),
QAST::Op.new(:op<can>,
QAST::Var.new(:$name, :scope<local>),
QAST::SVal.new(:value('sink')),
),
QAST::Op.new(:op<if>,
QAST::Op.new(:op<can>,
QAST::Var.new(:$name, :scope<local>),
QAST::SVal.new(:value('sink')),
),
QAST::Op.new(:op<defined>,
QAST::Var.new(:$name, :scope<local>),
)
)
),
QAST::Op.new(:op<callmethod>, :name<sink>,
QAST::Var.new(:$name, :scope<local>),
Expand Down
2 changes: 1 addition & 1 deletion src/Perl6/Metamodel/GenericHOW.pm
Expand Up @@ -34,7 +34,7 @@ class Perl6::Metamodel::GenericHOW
}

method find_method($obj, $name) {
nqp::die("Cannot call a method on type variable " ~ self.name($obj))
nqp::null()
}

method type_check($obj, $checkee) {
Expand Down

0 comments on commit 63659db

Please sign in to comment.