Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created January 6, 2022 16:17
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 MasterDuke17/cf21dc853d9aac1206821275258c802e to your computer and use it in GitHub Desktop.
Save MasterDuke17/cf21dc853d9aac1206821275258c802e to your computer and use it in GitHub Desktop.
diff --git src/core.c/Exception.pm6 src/core.c/Exception.pm6
index 0fccfd425..554d72a0f 100644
--- src/core.c/Exception.pm6
+++ src/core.c/Exception.pm6
@@ -164,6 +164,7 @@ method message()
# These attributes are an implementation detail. Not to be documented.
has $.in-class-call;
has $.containerized;
+ has $.type;
method of-type() {
nqp::eqaddr(nqp::decont($!invocant),IterationEnd)
@@ -252,7 +253,7 @@ sub find_public_suggestion($before, $after --> Nil)
$found-types.set($method_candidate.package.^name());
}
else {
- find_public_suggestion($.method, $method_name) if nqp::can(::($.typename), $method_name);
+ find_public_suggestion($.method, $method_name) if nqp::can($.type, $method_name);
}
}
if $found-types.keys -> @types {
diff --git src/vm/moar/dispatchers.nqp src/vm/moar/dispatchers.nqp
index 6e89a6df9..e376ad993 100644
--- src/vm/moar/dispatchers.nqp
+++ src/vm/moar/dispatchers.nqp
@@ -872,6 +872,7 @@ sub report-method-not-found($obj, $name, $class, $how, $containerized) {
:invocant($obj),
:method($name),
:typename($how.name($obj)),
+ :type(nqp::what($obj)),
:private(nqp::hllboolfor(0, 'Raku')),
:in-class-call(nqp::hllboolfor(nqp::eqaddr(nqp::what($obj), $class), 'Raku')),
:containerized(nqp::hllboolfor($containerized, 'Raku'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment