mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-20 02:32:36 +00:00
Fixed type inference for rangenext
This commit is contained in:
parent
13cc9e453c
commit
06aed186e2
@ -118,7 +118,12 @@ public class SymbolTypeInference {
|
||||
} else if(rValue instanceof RangeComparison) {
|
||||
return ((RangeComparison) rValue).getType();
|
||||
} else if(rValue instanceof RangeNext) {
|
||||
return inferType(symbols, ((RangeNext) rValue).getRangeFirst());
|
||||
SymbolType rangedType = inferType(symbols, ((RangeNext) rValue).getRangeFirst());
|
||||
if(SymbolType.SBYTE.equals(rangedType) || SymbolType.SWORD.equals(rangedType) || SymbolType.SDWORD.equals(rangedType)) {
|
||||
return SymbolType.SBYTE;
|
||||
} else {
|
||||
return SymbolType.BYTE;
|
||||
}
|
||||
} else if(rValue instanceof ProcedureRef) {
|
||||
Procedure procedure = symbols.getProcedure((ProcedureRef) rValue);
|
||||
return procedure.getType();
|
||||
|
Loading…
Reference in New Issue
Block a user