@@ -58,13 +58,6 @@ bool ImplicitParamType::equals(const artic::Type* other) const {
5858 other->as <ImplicitParamType>()->underlying == underlying;
5959}
6060
61- bool DefaultParamType::equals (const artic::Type* other) const {
62- return
63- other->isa <DefaultParamType>() &&
64- other->as <DefaultParamType>()->underlying == underlying &&
65- other->as <DefaultParamType>()->expr == expr;
66- }
67-
6861bool FnType::equals (const Type* other) const {
6962 return
7063 other->isa <FnType>() &&
@@ -127,13 +120,6 @@ size_t ImplicitParamType::hash() const {
127120 .combine (underlying);
128121}
129122
130- size_t DefaultParamType::hash () const {
131- return fnv::Hash ()
132- .combine (typeid (*this ).hash_code ())
133- .combine (underlying)
134- .combine (expr);
135- }
136-
137123size_t FnType::hash () const {
138124 return fnv::Hash ()
139125 .combine (typeid (*this ).hash_code ())
@@ -178,10 +164,6 @@ bool ImplicitParamType::contains(const artic::Type* type) const {
178164 return type == this || underlying->contains (type);
179165}
180166
181- bool DefaultParamType::contains (const artic::Type* type) const {
182- return type == this || underlying->contains (type);
183- }
184-
185167bool FnType::contains (const Type* type) const {
186168 return type == this || dom->contains (type) || codom->contains (type);
187169}
@@ -224,10 +206,6 @@ const Type* ImplicitParamType::replace(const artic::ReplaceMap& map) const {
224206 return type_table.implicit_param_type (underlying->replace (map));
225207}
226208
227- const Type* DefaultParamType::replace (const artic::ReplaceMap& map) const {
228- return type_table.default_param_type (underlying->replace (map), expr);
229- }
230-
231209const Type* FnType::replace (const std::unordered_map<const TypeVar*, const Type*>& map) const {
232210 return type_table.fn_type (dom->replace (map), codom->replace (map));
233211}
@@ -255,10 +233,6 @@ size_t ImplicitParamType::order(std::unordered_set<const Type*>& seen) const {
255233 return underlying->order (seen);
256234}
257235
258- size_t DefaultParamType::order (std::unordered_set<const Type*>& seen) const {
259- return underlying->order (seen);
260- }
261-
262236size_t FnType::order (std::unordered_set<const Type*>& seen) const {
263237 return 1 + std::max (dom->order (seen), codom->order (seen));
264238}
@@ -320,10 +294,6 @@ void ImplicitParamType::variance(TypeVarMap<artic::TypeVariance>& vars, bool dir
320294 return underlying->variance (vars, dir);
321295}
322296
323- void DefaultParamType::variance (TypeVarMap<artic::TypeVariance>& vars, bool dir) const {
324- return underlying->variance (vars, dir);
325- }
326-
327297void TypeVar::variance (std::unordered_map<const TypeVar*, TypeVariance>& vars, bool dir) const {
328298 if (auto it = vars.find (this ); it != vars.end ()) {
329299 bool var_dir = it->second == TypeVariance::Covariant ? true : false ;
@@ -363,10 +333,6 @@ void ImplicitParamType::bounds(TypeVarMap<artic::TypeBounds>& bounds, const arti
363333 underlying->bounds (bounds, type, dir);
364334}
365335
366- void DefaultParamType::bounds (TypeVarMap<artic::TypeBounds>& bounds, const artic::Type* type, bool dir) const {
367- underlying->bounds (bounds, type, dir);
368- }
369-
370336void FnType::bounds (std::unordered_map<const TypeVar*, TypeBounds>& bounds, const Type* type, bool dir) const {
371337 if (auto fn_type = type->isa <FnType>()) {
372338 dom->bounds (bounds, fn_type->dom , !dir);
@@ -404,10 +370,6 @@ bool ImplicitParamType::is_sized(std::unordered_set<const Type*>& seen) const {
404370 return underlying->is_sized (seen);
405371}
406372
407- bool DefaultParamType::is_sized (std::unordered_set<const Type*>& seen) const {
408- return underlying->is_sized (seen);
409- }
410-
411373bool FnType::is_sized (std::unordered_set<const Type*>& seen) const {
412374 return dom->is_sized (seen) && codom->is_sized (seen);
413375}
@@ -529,9 +491,6 @@ bool Type::subtype(const Type* other) const {
529491 if (auto implicit = other->isa <ImplicitParamType>())
530492 return this ->subtype (implicit->underlying ) || is_unit_type (this );
531493
532- if (auto default_type = other->isa <DefaultParamType>())
533- return this ->subtype (default_type->underlying ) || is_unit_type (this );
534-
535494 auto other_ptr_type = other->isa <PtrType>();
536495
537496 // Take the address of values automatically:
@@ -719,10 +678,6 @@ const ImplicitParamType* TypeTable::implicit_param_type(const Type* underlying)
719678 return insert<ImplicitParamType>(underlying);
720679}
721680
722- const DefaultParamType* TypeTable::default_param_type (const Type* underlying, const ast::Expr* expr) {
723- return insert<DefaultParamType>(underlying, expr);
724- }
725-
726681const FnType* TypeTable::fn_type (const Type* dom, const Type* codom) {
727682 return insert<FnType>(dom, codom);
728683}
0 commit comments