compilation error in RTL
Original Reporter info from Mantis: mr-highball
-
Reporter name: Highball
Original Reporter info from Mantis: mr-highball
- Reporter name: Highball
Description:
Hello, I just recently pulled trunk of pas2js and fpc/lazarus (today 10/8/2020) and when compiling my projects
https://github.com/mr-highball/nyx/tree/master/test
I get the following compilation error:
Rtl.BrowserLoadHelper.pas(38,16) Error: identifier not found "_then"
The only thing I have defined is to "skip async" since I was having troubles with that in prior versions of pas2js
the error takes me to this section of code. Any suggestions?
class procedure TBrowserLoadHelper.LoadText(aURL: String; aSync: Boolean; OnLoaded: TTextLoadedCallBack; OnError: TErrorCallBack);
function doFetchOK(response : JSValue) : JSValue;
var
Res : TJSResponse absolute response;
begin
Result:=False;
If (Res.status<>200) then
begin
If Assigned(OnError) then
OnError('Error '+IntToStr(Res.Status)+ ': '+Res.StatusText)
end
else
Res.Text._then( <-------------ERROR
function (value : JSValue) : JSValue
begin
OnLoaded(String(value));
end
);
end;
Steps to reproduce:
- git clone https://github.com/mr-highball/nyx
- open test\nyx_browser_test.lpr and try to compile
Mantis conversion info:
- Mantis ID: 37893