diff --git a/AK/Error.h b/AK/Error.h index 007bd8a22a0..b2221013b82 100644 --- a/AK/Error.h +++ b/AK/Error.h @@ -37,6 +37,13 @@ public: return from_string_view(StringView { string_literal, N - 1 }); } + // Note: Don't call this from C++; it's here for Jakt interop (as the name suggests). + template T> + ALWAYS_INLINE static Error __jakt_from_string_literal(T string) + { + return from_string_view(string); + } + bool operator==(Error const& other) const { return m_code == other.m_code && m_string_literal == other.m_string_literal && m_syscall == other.m_syscall;