Skip to content

Commit 7641a60

Browse files
Merge pull request #390 from KisaragiEffective/refactor/typeck/rename-variant
2 parents c01e1a4 + 28ffabc commit 7641a60

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package/origlang-compiler/src/type_check.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl TryIntoTypeCheckedForm for Expression {
117117
return_type: Type::Boolean,
118118
})
119119
} else {
120-
Err(TypeCheckError::UnableToUnifyEqualityQuery {
120+
Err(TypeCheckError::UnableToUnifyBinaryOperatorOutputType {
121121
operator: BinaryOperatorKind::Equal,
122122
got_lhs: lhs_type,
123123
got_rhs: rhs_type
@@ -133,7 +133,7 @@ impl TryIntoTypeCheckedForm for Expression {
133133
return_type: Type::Boolean,
134134
})
135135
} else {
136-
Err(TypeCheckError::UnableToUnifyEqualityQuery {
136+
Err(TypeCheckError::UnableToUnifyBinaryOperatorOutputType {
137137
operator: BinaryOperatorKind::NotEqual,
138138
got_lhs: lhs_type,
139139
got_rhs: rhs_type
@@ -149,8 +149,7 @@ impl TryIntoTypeCheckedForm for Expression {
149149
return_type: lhs_type
150150
})
151151
} else {
152-
// TODO: equalityではない
153-
Err(TypeCheckError::UnableToUnifyEqualityQuery {
152+
Err(TypeCheckError::UnableToUnifyBinaryOperatorOutputType {
154153
operator,
155154
got_lhs: lhs_type,
156155
got_rhs: rhs_type,

package/origlang-compiler/src/type_check/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub enum TypeCheckError {
1818
#[error("Undefined identifier: {0}")]
1919
UndefinedIdentifier(Identifier),
2020
#[error("Cannot compare between two different types. lhs: {got_lhs}, rhs: {got_rhs}")]
21-
UnableToUnifyEqualityQuery {
21+
UnableToUnifyBinaryOperatorOutputType {
2222
operator: BinaryOperatorKind,
2323
got_lhs: Type,
2424
got_rhs: Type,

0 commit comments

Comments
 (0)