new compiler options in CMakeLists, fixes

This commit is contained in:
ProgramSnail 2023-05-19 10:27:14 +03:00
parent 9b3d2812ba
commit 17328b842c
11 changed files with 62 additions and 60 deletions

View file

@ -18,15 +18,13 @@ class ExecuteVisitor : public Visitor {
public:
explicit ExecuteVisitor(info::GlobalInfo& global_info,
info::ContextManager<info::type::Type, info::type::TypeManager>& type_context_manager,
info::ContextManager<info::value::Value, info::value::ValueManager>& context_manager,
interpreter::tokens::PartitionStatement* execution_root)
: namespace_visitor_(global_info.CreateVisitor()),
global_info_(global_info),
info::ContextManager<info::value::Value, info::value::ValueManager>& context_manager)
: global_info_(global_info),
typeclass_graph_(*global_info.GetTypeclassGraph()),
type_context_manager_(type_context_manager),
context_manager_(context_manager) {}
void VisitSourceFile(SourceFile* source_file) override {
void VisitSourceFile(SourceFile*) override {
error_handling::HandleInternalError("VisitSourceFile unavailible", "ExecuteVisitor.VisitSourceFile");
};
@ -160,7 +158,6 @@ private:
return maybe_internal_value_info.value();
}
private:
info::GlobalInfo::NamespaceVisitor namespace_visitor_;
info::GlobalInfo& global_info_;
info::TypeclassGraph& typeclass_graph_;
info::ContextManager<info::type::Type, info::type::TypeManager>& type_context_manager_;

View file

@ -121,7 +121,7 @@ public:
const std::string& type,
const std::string& name,
utils::IsConstModifier modifier) {
std::optional<utils::IdType> id = FindFunctionId(path, name);
std::optional<utils::IdType> id = FindMethodId(path, type, name, modifier);
if (!id.has_value()) {
return std::nullopt;
}

View file

@ -62,7 +62,7 @@ public:
utils::IdType type,
utils::ClassModifier class_modifier,
TypeManager* type_manager)
: type_id_(type_id), type_(type), type_manager_(type_manager) {}
: type_id_(type_id), type_(type), class_modifier_(class_modifier), type_manager_(type_manager) {}
std::optional<utils::IdType> InContext(const std::unordered_map<std::string, utils::IdType>& context);
bool Same(const DefinedType& type) const;
@ -177,7 +177,7 @@ public:
return constructors_;
}
const void SetCurrentConstructor(size_t constructor) {
void SetCurrentConstructor(size_t constructor) {
current_constructor_ = constructor;
}