Skip to content

Commit

Permalink
Set an attribute type to Any if there's no supplied type constraint.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 12, 2010
1 parent 0d0672b commit 5c78c71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Perl6/Compiler/Package.pm
Expand Up @@ -181,6 +181,11 @@ method finish($block) {
$_<type>.named('type');
$attr.push($_<type>);
}
else {
$attr.push(PAST::Var.new(
:name('Any'), :namespace([]), :scope('package'), :named('type')
));
}
$decl.push(PAST::Op.new(
:pasttype('callmethod'),
:name('add_attribute'),
Expand Down

0 comments on commit 5c78c71

Please sign in to comment.