mirror of
https://github.com/irmen/prog8.git
synced 2025-11-01 22:16:16 +00:00
allow pointer to pointer assignment in cast codegen, fixes #191
This commit is contained in:
@@ -2774,6 +2774,9 @@ $endLabel""")
|
||||
} else if(valueDt.isLong && targetDt.isWord) {
|
||||
// long to word, just take the lsw
|
||||
assignCastViaLswFunc(value, target)
|
||||
} else if(valueDt.isPointer && targetDt.isPointer) {
|
||||
// pointer type A to pointer type B, just assign
|
||||
assignExpressionToRegister(value, target.register!!, valueDt.isSigned)
|
||||
} else
|
||||
throw AssemblyError("can't cast $valueDt to $targetDt, this should have been checked in the astchecker ${value.position}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user