Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Stash types in signature objects.
  • Loading branch information
jnthn committed Aug 22, 2010
1 parent f324cbc commit e21ef65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dotnet/compiler/Actions.pm
Expand Up @@ -565,7 +565,7 @@ method parameter($/) {
# We're hijacking multi-type a bit here comapred to what Parrot NQP
# uses it for.
if $<typename> {
$past.multitype($<typename>.ast);
$past.multitype($<typename>[0].ast);
}

make $past;
Expand Down
9 changes: 7 additions & 2 deletions dotnet/compiler/PAST2DNSTCompiler.pm
Expand Up @@ -355,8 +355,13 @@ sub compile_signature(@params) {
for @params {
my $param := DNST::New.new( :type('Parameter') );

# Type. XXX TODO.
$param.push('null');
# Type.
if $_.multitype {
$param.push(dnst_for($_.multitype));
}
else {
$param.push('null');
}

# Variable name to bind into.
$param.push(DNST::Literal.new( :value($_.name), :escape(1) ));
Expand Down

0 comments on commit e21ef65

Please sign in to comment.