File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -163,8 +163,11 @@ SubstitutionParamMapping::fill_param_ty (
163
163
164
164
if (type.get_kind () == TypeKind::PARAM)
165
165
{
166
- // delete param;
167
- param = static_cast <ParamType *> (type.clone ());
166
+ param = static_cast <BaseGeneric *> (type.clone ());
167
+ }
168
+ else if (type.get_kind () == TyTy::TypeKind::CONST)
169
+ {
170
+ param = static_cast <BaseGeneric *> (type.clone ());
168
171
}
169
172
else if (param->get_kind () == TypeKind::PARAM)
170
173
{
Original file line number Diff line number Diff line change 37
37
#include " options.h"
38
38
#include " rust-system.h"
39
39
#include " tree.h"
40
+ #include " fold-const.h"
40
41
#include < string>
41
42
42
43
namespace Rust {
@@ -3712,9 +3713,14 @@ ConstType::is_equal (const BaseType &other) const
3712
3713
return false ;
3713
3714
}
3714
3715
3715
- // TODO
3716
+ const ConstType &rhs = static_cast <const ConstType &> (other);
3717
+ if (!get_ty ()->is_equal (*rhs.get_ty ()))
3718
+ return false ;
3716
3719
3717
- return false ;
3720
+ tree lv = get_value ();
3721
+ tree rv = rhs.get_value ();
3722
+
3723
+ return operand_equal_p (lv, rv, 0 );
3718
3724
}
3719
3725
3720
3726
ConstType *
You can’t perform that action at this time.
0 commit comments