Refactor errors and update post draft.
This commit is contained in:
@@ -64,9 +64,9 @@ void definition_data::insert_constructors() const {
|
||||
type_ptr return_type(return_app);
|
||||
for(auto& var : vars) {
|
||||
if(var_set.find(var) != var_set.end())
|
||||
throw std::runtime_error(
|
||||
throw compiler_error(
|
||||
std::string("type variable ") +
|
||||
var + std::string(" used twice in data type definition."));
|
||||
var + std::string(" used twice in data type definition."), loc);
|
||||
var_set.insert(var);
|
||||
return_app->arguments.push_back(type_ptr(new type_var(var)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user