This commit is contained in:
parent
577e0ad930
commit
493419f324
|
@ -1,9 +1,7 @@
|
||||||
#include "ast.hpp"
|
#include "ast.hpp"
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <iostream>
|
|
||||||
#include "binop.hpp"
|
#include "binop.hpp"
|
||||||
#include "error.hpp"
|
#include "error.hpp"
|
||||||
#include "type.hpp"
|
|
||||||
#include "type_env.hpp"
|
#include "type_env.hpp"
|
||||||
|
|
||||||
static void print_indent(int n, std::ostream& to) {
|
static void print_indent(int n, std::ostream& to) {
|
||||||
|
@ -164,10 +162,6 @@ type_ptr ast_case::typecheck(type_mgr& mgr) {
|
||||||
|
|
||||||
input_type = mgr.resolve(case_type, var);
|
input_type = mgr.resolve(case_type, var);
|
||||||
if(!dynamic_cast<type_data*>(input_type.get())) {
|
if(!dynamic_cast<type_data*>(input_type.get())) {
|
||||||
std::cout << dynamic_cast<type_data*>(input_type.get()) << std::endl;
|
|
||||||
std::cout << dynamic_cast<type_base*>(input_type.get()) << std::endl;
|
|
||||||
std::cout << var << std::endl;
|
|
||||||
input_type->print(mgr, std::cout); std::cout << std::endl;
|
|
||||||
throw type_error("attempting case analysis of non-data type");
|
throw type_error("attempting case analysis of non-data type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user