diff --git a/source/tlang/compiler/typecheck/core.d b/source/tlang/compiler/typecheck/core.d index c2d2f677..8dfc4c9e 100644 --- a/source/tlang/compiler/typecheck/core.d +++ b/source/tlang/compiler/typecheck/core.d @@ -1821,10 +1821,16 @@ public final class TypeChecker } } } + // If both left and right operands are pointers + else if(isPointerType(vLhsType) && isPointerType(vRhsType)) // is Pointer, is Pointer + { + expect("Both left hand side and right hand side cannot be pointers in any arithmetic operation"); + } else { // See issue #141: Binary Operators support for non-Integer types (https://deavmi.assigned.network/git/tlang/tlang/issues/141) ERROR("FIXME: We need to add support for this, class equality, and others like floats"); + assert(false); }