Today I did a copy/paste typo and the IDE did not find this bug, but handled the sub call as normal. But the variable was empty afterwards.
Lets say I would have this function:
B4X:
Sub Button1_Click
Dim Original As String ="abcdefg"
Dim After As String =NonSenseFunction(Original)
Log("<" & After & "><" & Original &">")
End Sub
Sub NonSenseFunction(text As String) As String
Return "12345"
End Sub
Sub Button1_Click
Dim Original As String ="abcdefg"
Dim After As String =NonSenseFunction(Original),Original
Log("<" & After & "><" & Original &">")
End Sub
Sub NonSenseFunction(text As String) As String
Return "12345"
End Sub
Dim Original As String = ""
Original = "abcdefg"
Dim After As String = ""
After = NonSenseFunction(Original)
Dim Original As String = ""
Log("<" & After & "><" & Original &">")