Type check pointer dereferencing
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
#include "elna/source/result.hpp"
|
||||
#include "elna/source/types.hpp"
|
||||
|
||||
namespace elna::source
|
||||
{
|
||||
@ -33,4 +32,15 @@ namespace elna::source
|
||||
{
|
||||
return "Name '" + name + "' was already defined";
|
||||
}
|
||||
|
||||
type_mismatch::type_mismatch(std::shared_ptr<const type> got, operation kind, const std::filesystem::path& path,
|
||||
const struct position position)
|
||||
: error(path, position), kind(kind), got(got)
|
||||
{
|
||||
}
|
||||
|
||||
std::string type_mismatch::what() const
|
||||
{
|
||||
return "Type cannot be used here.";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user