Skip to content

Instantly share code, notes, and snippets.

@moritz
Created August 1, 2011 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/1118066 to your computer and use it in GitHub Desktop.
Save moritz/1118066 to your computer and use it in GitHub Desktop.
Weird IMCC error
multi sub my-die(Mu $class, *%params) {
my Mu $p6ex = $class.new(|%params);
my Mu $parrot_ex := pir::new__PS('Exception');
pir::setattribute__vPsP($parrot_ex, 'payload', $p6ex);
# pir::throw__vP($parrot_ex);
};
say 'alive';
my-die(X::Base, message => 'Foo!');
error:imcc:syntax error, unexpected '\n'
in file '(file unknown)' line 72988894
error:imcc:syntax error ... somewhere
in file '(file unknown)' line 72988928
syntax error ... somewhere
$ ./install/bin/parrot foo.pir
error:imcc:syntax error, unexpected '\n'
in file 'foo.pir' line 456
error:imcc:syntax error ... somewhere
in file 'foo.pir' line 490
syntax error ... somewhere
.annotate 'line', 1
store_lex "$parrot_ex", $P101
.annotate 'line', 4
find_lex $P100, "$parrot_ex"
nqp_get_sc_object $P101, "1312203255.44179", 9
set $S100, $P101
find_lex $P102, "$p6ex"
setattribute $P100, $S100, $P102
.annotate 'line', 1
perl6_decontainerize_return_value $P100, # <-- line 456
goto lexotic_17
lexotic_16:
.get_results ($P100)
lexotic_17:
find_lex $P101, "&EXHAUST"
store_lex "RETURN", $P101
perl6_type_check_return_value $P100
.return ($P100)
.end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment