@@ -867,6 +867,18 @@ class ArrayRules : public BaseRules
867
867
TyVar (base_resolved->get_ref ()));
868
868
}
869
869
870
+ void visit (InferType &type) override
871
+ {
872
+ if (type.get_infer_kind () != InferType::InferTypeKind::GENERAL)
873
+ {
874
+ BaseRules::visit (type);
875
+ return ;
876
+ }
877
+
878
+ resolved = base->clone ();
879
+ resolved->set_ref (type.get_ref ());
880
+ }
881
+
870
882
private:
871
883
BaseType *get_base () override { return base; }
872
884
@@ -896,6 +908,18 @@ class SliceRules : public BaseRules
896
908
TyVar (base_resolved->get_ref ()));
897
909
}
898
910
911
+ void visit (InferType &type) override
912
+ {
913
+ if (type.get_infer_kind () != InferType::InferTypeKind::GENERAL)
914
+ {
915
+ BaseRules::visit (type);
916
+ return ;
917
+ }
918
+
919
+ resolved = base->clone ();
920
+ resolved->set_ref (type.get_ref ());
921
+ }
922
+
899
923
private:
900
924
BaseType *get_base () override { return base; }
901
925
@@ -1140,6 +1164,18 @@ class TupleRules : public BaseRules
1140
1164
type.get_ident ().locus , fields);
1141
1165
}
1142
1166
1167
+ void visit (InferType &type) override
1168
+ {
1169
+ if (type.get_infer_kind () != InferType::InferTypeKind::GENERAL)
1170
+ {
1171
+ BaseRules::visit (type);
1172
+ return ;
1173
+ }
1174
+
1175
+ resolved = base->clone ();
1176
+ resolved->set_ref (type.get_ref ());
1177
+ }
1178
+
1143
1179
private:
1144
1180
BaseType *get_base () override { return base; }
1145
1181
@@ -1263,6 +1299,18 @@ class ReferenceRules : public BaseRules
1263
1299
base->mutability ());
1264
1300
}
1265
1301
1302
+ void visit (InferType &type) override
1303
+ {
1304
+ if (type.get_infer_kind () != InferType::InferTypeKind::GENERAL)
1305
+ {
1306
+ BaseRules::visit (type);
1307
+ return ;
1308
+ }
1309
+
1310
+ resolved = base->clone ();
1311
+ resolved->set_ref (type.get_ref ());
1312
+ }
1313
+
1266
1314
private:
1267
1315
BaseType *get_base () override { return base; }
1268
1316
@@ -1303,6 +1351,18 @@ class PointerRules : public BaseRules
1303
1351
base->mutability ());
1304
1352
}
1305
1353
1354
+ void visit (InferType &type) override
1355
+ {
1356
+ if (type.get_infer_kind () != InferType::InferTypeKind::GENERAL)
1357
+ {
1358
+ BaseRules::visit (type);
1359
+ return ;
1360
+ }
1361
+
1362
+ resolved = base->clone ();
1363
+ resolved->set_ref (type.get_ref ());
1364
+ }
1365
+
1306
1366
private:
1307
1367
BaseType *get_base () override { return base; }
1308
1368
0 commit comments