mirror of
https://github.com/IRBorisov/ConceptCore.git
synced 2025-06-26 01:00:36 +03:00
B: Fix typecheck on multi filter
This commit is contained in:
parent
dc395e1ac8
commit
711361781e
|
@ -18,9 +18,11 @@ public:
|
|||
: context{ context } {}
|
||||
|
||||
public:
|
||||
[[nodiscard]] bool CompareTemplated(Typification::Substitutes& substitutes,
|
||||
[[nodiscard]] bool CompareTemplated(
|
||||
Typification::Substitutes& substitutes,
|
||||
const Typification& arg,
|
||||
const Typification& value);
|
||||
const Typification& value
|
||||
);
|
||||
[[nodiscard]] bool IsArithmetic(const Typification& type) const;
|
||||
[[nodiscard]] bool IsOrdered(const Typification& type) const;
|
||||
[[nodiscard]] std::optional<Typification> Merge(const Typification& type1, const Typification& type2) const;
|
||||
|
|
|
@ -1008,7 +1008,6 @@ bool TypeAuditor::ViFilter(Cursor iter) {
|
|||
);
|
||||
return false;
|
||||
}
|
||||
++child; // NOLINT(clang-diagnostic-for-loop-analysis)
|
||||
}
|
||||
} else {
|
||||
const auto param = ChildType(iter, 0);
|
||||
|
|
|
@ -347,6 +347,7 @@ TEST_F(UTTypeAuditor, TypedOperationsCorrect) {
|
|||
ExpectTypification(R"(Pr1(S1))", "B(X1)"_t);
|
||||
ExpectTypification(R"(Fi1[X1](S1))", "B(X1*X1)"_t);
|
||||
ExpectTypification(R"(Fi1,2[X1, X1](S1))", "B(X1*X1)"_t);
|
||||
ExpectTypification(R"(Fi1,2[X1, X1](X1*X1))", "B(X1*X1)"_t);
|
||||
ExpectTypification(R"(Fi1,2[X1 * X1](S1))", "B(X1*X1)"_t);
|
||||
ExpectTypification(R"(Fi1[{1,2,3}](Z*X1))", "B(Z*X1)"_t);
|
||||
ExpectTypification(R"(Fi1[{1,2,3}](C1*X1))", "B(C1*X1)"_t);
|
||||
|
@ -374,6 +375,7 @@ TEST_F(UTTypeAuditor, TypedOperationsErrors) {
|
|||
ExpectError(R"(Fi1[Z](B(X1)))", SemanticEID::invalidFilterArgumentType, 7);
|
||||
ExpectError(R"(Fi3[X1](X1*X1))", SemanticEID::invalidFilterArgumentType, 8);
|
||||
ExpectError(R"(Fi1[X1](B(X1)*X1))", SemanticEID::typesNotEqual, 4);
|
||||
ExpectError(R"(Fi1,2[X1,{X1}](X1*X1))", SemanticEID::typesNotEqual, 9);
|
||||
ExpectError(R"(Fi1,2[X1*{X1}](B(X1)*X1))", SemanticEID::typesNotEqual, 6);
|
||||
ExpectError(R"(Fi1,2,1[X1, X1](X1*X1))", SemanticEID::invalidFilterArity, 0);
|
||||
ExpectError(R"(\A a \in X1 Fi1[a](B(X1)*X1) \eq X1)", SemanticEID::typesNotEqual, 16);
|
||||
|
|
|
@ -19,11 +19,17 @@ Here we write upgrading notes. Make them as straightforward as possible.
|
|||
|
||||
### Fixed
|
||||
|
||||
## [0.1.12] - 2024-12-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix multi filter typification check
|
||||
|
||||
## [0.1.11] - 2024-10-17
|
||||
|
||||
- Allow enumeration in structure definition
|
||||
### Fixed
|
||||
|
||||
### Changed
|
||||
- Allow enumeration in structure definition
|
||||
|
||||
## [0.1.10] - 2024-09-25
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
0.1.11
|
||||
0.1.12
|
Loading…
Reference in New Issue
Block a user