diff --git a/api/any.hpp b/api/any.hpp index aac8b8a0f..55148c0ba 100644 --- a/api/any.hpp +++ b/api/any.hpp @@ -288,7 +288,7 @@ namespace jule if (src.operator!=(nullptr)) stream << src.type->to_str(src.data); else - stream << 0; + stream << ""; return stream; } }; diff --git a/api/fn.hpp b/api/fn.hpp index 2f3e55dee..d0bfd4366 100644 --- a/api/fn.hpp +++ b/api/fn.hpp @@ -89,19 +89,19 @@ namespace jule return this->_addr; } - inline Fn& operator=(std::nullptr_t) noexcept + inline Fn &operator=(std::nullptr_t) noexcept { this->buffer = nullptr; return *this; } - inline Fn& operator=(const std::function &function) + inline Fn &operator=(const std::function &function) { this->buffer = function; return *this; } - inline Fn& operator=(const Function &function) + inline Fn &operator=(const Function &function) { this->buffer = function; return *this; @@ -130,6 +130,8 @@ namespace jule friend std::ostream &operator<<(std::ostream &stream, const Fn &src) noexcept { + if (src == nullptr) + return (stream << ""); return (stream << (void *)src._addr); } }; diff --git a/api/ptr.hpp b/api/ptr.hpp index dbc1a3c1a..6b9905072 100644 --- a/api/ptr.hpp +++ b/api/ptr.hpp @@ -320,7 +320,7 @@ namespace jule const jule::Ptr &ref) noexcept { if (ref == nullptr) - stream << "nil"; + stream << ""; else stream << ref.alloc; return stream; diff --git a/api/trait.hpp b/api/trait.hpp index 6819bf544..9669c518b 100644 --- a/api/trait.hpp +++ b/api/trait.hpp @@ -276,6 +276,8 @@ namespace jule friend inline std::ostream &operator<<(std::ostream &stream, const jule::Trait &src) noexcept { + if (src == nullptr) + return stream << ""; return stream << (void *)src.data.alloc; } };