Bug? B4A V8 beta#1 resumable sub error

DavideV

Active Member
Licensed User
Longtime User
Error compiling when the sub looks like:
B4X:
'browser selected
Sub SelectBrowser_Click(Index As Int)
    Dim Url As UrlInfo=Browsers.Get(Index)

The problem is the 'Index as int' variable naming that seems to be used by the resumable sub class also:

B4X:
public static void  _selectbrowser_click(int _index) throws Exception{
ResumableSub_SelectBrowser_Click rsub = new ResumableSub_SelectBrowser_Click(null,_index);
rsub.resume(processBA, null);
}
public static class ResumableSub_SelectBrowser_Click extends BA.ResumableSub {
public ResumableSub_SelectBrowser_Click(it.davidev.tagapplauncher.activitybrowseurl parent,int _index) {
this.parent = parent;
this._index = _index;
}


The compiler error:

B4X:
B4A Version: 8.00 BETA #1
Parsing code.    (0.55s)
Compiling code.    (3.69s)
Compiling layouts code.    (0.14s)
Organizing libraries.    (0.00s)
Generating R file.    (1.40s)
Compiling generated Java code.    Error
B4A line: 485
End Sub
src\it\davidev\tagapplauncher\activitybrowseurl.java:815: error: cannot find symbol
this._index = _index;
    ^
  symbol: variable _index


This didn't happen with B4A V7.80
 

DavideV

Active Member
Licensed User
Longtime User
Here you are.
the project does nothing, but is enough to see the error.
I use:
B4A V8 beta 1
JDK 9.04

just change the lines:
B4X:
'browser selected
Sub SelectBrowser_Click(Index As Int)
Dim Url As UrlInfo=Browsers.Get(Index)

into:
B4X:
'browser selected
Sub SelectBrowser_Click(Idx As Int)
Dim Url As UrlInfo=Browsers.Get(Idx)

to get it compiled
 

Attachments

  • testCompilerError.zip
    23.1 KB · Views: 176
Top