Skip to content

Commit

Permalink
fix(type_checker): T* + T* is not a valid expression
Browse files Browse the repository at this point in the history
  • Loading branch information
MilkeeyCat committed Oct 12, 2024
1 parent 1df1948 commit 6d7a576
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/passes/type_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ impl TypeChecker {

Ok(match op {
BinOp::Add => match ((left, left_type), (right, right_type)) {
// T* + T*
((_, Type::Ptr(lhs)), (_, Type::Ptr(rhs))) if lhs == rhs => (),
// T* + 10 / 10 + T* / T* + foo / foo + T*
((_, Type::Ptr(_)), (expr, offset)) | ((expr, offset), (_, Type::Ptr(_)))
if Expr::int_lit_only(expr) || offset == Type::UInt(UintType::Usize) =>
Expand Down

0 comments on commit 6d7a576

Please sign in to comment.