mirror of
https://github.com/irmen/prog8.git
synced 2025-02-16 22:30:46 +00:00
remove bogus
This commit is contained in:
parent
1d7f0d3537
commit
49eb7e7803
@ -161,19 +161,6 @@ private class StatementReorderer(private val program: Program): IAstProcessor {
|
||||
return scope
|
||||
}
|
||||
|
||||
override fun process(decl: VarDecl): IStatement {
|
||||
if(decl.arraysize==null) {
|
||||
val array = decl.value as? LiteralValue
|
||||
if(array!=null && array.isArray) {
|
||||
if(array.heapId==null)
|
||||
TODO("$decl")
|
||||
val size = program.heap.get(array.heapId!!).arraysize
|
||||
decl.arraysize = ArrayIndex(LiteralValue.optimalInteger(size, decl.position), decl.position)
|
||||
}
|
||||
}
|
||||
return super.process(decl)
|
||||
}
|
||||
|
||||
override fun process(expr: BinaryExpression): IExpression {
|
||||
val leftDt = expr.left.inferType(program)
|
||||
val rightDt = expr.right.inferType(program)
|
||||
|
Loading…
x
Reference in New Issue
Block a user