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

File with just + does not report syntax error #24617

Open
lucacasonato opened this issue Jul 17, 2024 · 3 comments
Open

File with just + does not report syntax error #24617

lucacasonato opened this issue Jul 17, 2024 · 3 comments
Labels
bug Something isn't working correctly swc related to swc (bundling/transpiling)

Comments

@lucacasonato
Copy link
Member

Create a file main.ts.

+

Then run deno info main.ts

No diagnostic is raised.

Change the file to:

a+

Running deno info main.ts now:

error: The module's source code could not be parsed: Expression expected at file:///home/lucacasonato/Downloads/publishing_tasks_903afdc4-681b-403c-bc23-1768af7eaad9/index.ts:1:2

  a+
   ~
@lucacasonato lucacasonato added bug Something isn't working correctly swc related to swc (bundling/transpiling) labels Jul 17, 2024
@lucacasonato
Copy link
Member Author

Same issue with:

void

@dsherret
Copy link
Member

This is by design. Certain diagnostics are only surfaced when transpiling:

> deno run main.ts 
error: Expression expected at file:///V:/scratch/main.ts:1:1

  +
  ~

@dsherret
Copy link
Member

The main reason for this issue was resolved in #24620

Maybe we should close this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly swc related to swc (bundling/transpiling)
Projects
None yet
Development

No branches or pull requests

2 participants