From 8db7736830746b2f5999ecfc9cea4169fa3b67ac Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 12 May 2019 13:51:36 +0200 Subject: [PATCH] Improved no-cast detection. 273/351 --- .../camelot64/kickc/model/types/SymbolTypeConversion.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/dk/camelot64/kickc/model/types/SymbolTypeConversion.java b/src/main/java/dk/camelot64/kickc/model/types/SymbolTypeConversion.java index f1663a6b8..88dd99c38 100644 --- a/src/main/java/dk/camelot64/kickc/model/types/SymbolTypeConversion.java +++ b/src/main/java/dk/camelot64/kickc/model/types/SymbolTypeConversion.java @@ -150,8 +150,16 @@ public class SymbolTypeConversion { return true; if(lValueType.equals(SymbolType.WORD) && rValueType.equals(SymbolType.BYTE)) return true; + if(lValueType.equals(SymbolType.DWORD) && rValueType.equals(SymbolType.BYTE)) + return true; + if(lValueType.equals(SymbolType.DWORD) && rValueType.equals(SymbolType.WORD)) + return true; if(lValueType.equals(SymbolType.SWORD) && rValueType.equals(SymbolType.SBYTE)) return true; + if(lValueType.equals(SymbolType.SDWORD) && rValueType.equals(SymbolType.SBYTE)) + return true; + if(lValueType.equals(SymbolType.SDWORD) && rValueType.equals(SymbolType.SWORD)) + return true; if(SymbolType.NUMBER.equals(rValueType) && SymbolType.isInteger(lValueType)) { // L-value is still a number - constants are probably not done being identified & typed return true;