Skip to content

Instantly share code, notes, and snippets.

@ugexe

ugexe/Foo.pm6 Secret

Last active June 2, 2016 16:31
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 ugexe/e48d7d63b193ebde7c0c8beb6ecc1fef to your computer and use it in GitHub Desktop.
Save ugexe/e48d7d63b193ebde7c0c8beb6ecc1fef to your computer and use it in GitHub Desktop.
===SORRY!=== Cannot assign to an immutable value (`perl6 -Ilib --ll-exception bin/zef --/test --depsonly install Inline::Perl5`) (rakudo 7250543)
class Foo is Bar {
method hash {
my %hash = callsame.append({ :$.api, :@!build-depends, :@!test-depends, :@!resources });
%hash<license> = $.license;
%hash<support> = %.support;
# Problem starts here
%hash<identity> = $.identity;
# https://github.com/ugexe/zef/blob/master/lib/Zef/Distribution.pm6#L80
# -> https://github.com/ugexe/zef/blob/master/lib/Zef/Distribution/DependencySpecification.pm6#L10
# -> https://github.com/ugexe/zef/blob/master/lib/Zef/Identity.pm6#L124
# -> https://github.com/ugexe/zef/blob/master/lib/Zef/Identity.pm6#L7
# -> https://github.com/ugexe/zef/blob/master/lib/Zef/Identity.pm6#L64
# -> https://github.com/ugexe/zef/blob/master/lib/Zef/Identity.pm6#L96
%hash<id> = $.id;
%hash<Str> = $.Str();
%hash;
}
}
# Started with: https://github.com/rakudo/rakudo/commit/725054360efa8e703367be8dc5d792769b19caed
# Larger context: https://github.com/ugexe/zef/blob/master/lib/Zef/Distribution.pm6#L73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment