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:
this would return:
But if I do this typo:
it returns this:
Is this a valid code line? Shouldn't the IDE find that error?
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
this would return:
<12345><abcdefg>
But if I do this typo:
B4X:
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
<12345><>
Is this a valid code line? Shouldn't the IDE find that error?