Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling HttpClient class in signalr.js due to delete method #353

Closed
failwyn opened this issue Apr 4, 2023 · 0 comments
Closed

Comments

@failwyn
Copy link

failwyn commented Apr 4, 2023

ISSUE: Error compiling HttpClient class in signalr.js due to delete method.

TEST CASE: Run the Test NUglify.Tests.JavaScript => Bugs => Bug353 (Fixed in PR#354)

Stack Trace: 
TestHelper.RunErrorTest(String settingsSwitches, JSError[] expectedErrorArray) line 906
TestHelper.RunErrorTest(JSError[] expectedErrorArray) line 700
Bugs.BugXXX() line 18
1) at NUglify.Tests.JavaScript.Common.TestHelper.RunErrorTest(String settingsSwitches, JSError[] expectedErrorArray) in \NUglify\src\NUglify.Tests\JavaScript\Common\TestHelper.cs:line 906
TestHelper.RunErrorTest(JSError[] expectedErrorArray) line 700
Bugs.BugXXX() line 18

Standard Output: 
INPUT FILE: \NUglify\src\NUglify.Tests\bin\Debug\TestData\JS\Input\Bugs\BugXXX.js
class HttpClient {
delete(url, options) {
return this.send({
...options,
method: "DELETE",
url,
});
}
}

---ERRORS---
NoIdentifier

    
    Error JS1010 at Line 2, Column 5: Expected identifier: delete
        Expected identifier: delete
        UNEXPECTED

UNEXPECTED ERROR RESULTS

FIX: Added the following code to JSKeyword.cs

case JSToken.Delete: return "delete";

failwyn pushed a commit to failwyn/NUglify that referenced this issue Apr 4, 2023
added delete to CanBeIdentifier (trullock#353)
@failwyn failwyn mentioned this issue Apr 4, 2023
trullock added a commit that referenced this issue Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants