So, I ran into a new problem.
Here is the problem code:
This code basically creates a blank CustomType and assigns it to a global variable.
However, the above gives me an error that the "Current declaration does not match the previous one"
That doesn't make any sense to me, because "logically", the two variables cant be declared at the same time anyways because its in an IF/ELSE block.
So why does the compiler care/complain that I am keeping the same variable name with two different types? again they can never be declared at the same time if you were to look at this logically.
Bug?
Here is the problem code:
B4X:
Sub cmdCancelSelection_Click
Dim CapturedButton As Label = Sender
If CapturedButton.Tag = 1 Then
Dim Blank As QuickHitInfo
Blank.Initialize
SelectedMedia.QuickHit = Blank
Else
Dim Blank As HeadShotInfo
Blank.Initialize
SelectedMedia.HeadShot = Blank
End If
RefreshSelectedPlaylists
End Sub
This code basically creates a blank CustomType and assigns it to a global variable.
However, the above gives me an error that the "Current declaration does not match the previous one"
That doesn't make any sense to me, because "logically", the two variables cant be declared at the same time anyways because its in an IF/ELSE block.
So why does the compiler care/complain that I am keeping the same variable name with two different types? again they can never be declared at the same time if you were to look at this logically.
Bug?