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

AutoAccessor missing "definite" in AST #8344

Closed
dsherret opened this issue Nov 25, 2023 · 2 comments · Fixed by #8436 or #8523
Closed

AutoAccessor missing "definite" in AST #8344

dsherret opened this issue Nov 25, 2023 · 2 comments · Fixed by #8436 or #8523
Labels
Milestone

Comments

@dsherret
Copy link
Contributor

dsherret commented Nov 25, 2023

Describe the bug

AutoAccessor nodes are missing a "definite" property for non-null assertions in TypeScript.

Input code

class Test {
    prop!: string;
    accessor includeSource!: string;
}

Config

No response

Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.3.100-nightly-20231125.1&code=H4sIAAAAAAAAA0vOSSwuVghJLS5RqOblUgCCgqL8AkUrheKSosy8dGuIWGJycmpxcX6RQmZeck5pSmpwfmlRciqyqloAhwjVK0kAAAA%3D&config=H4sIAAAAAAAAA2WPQQ7DIAwE73lF5HOv7aF%2F6CMQcSIqwMh2pEZR%2Fl4CCW3VG97Bu96163t4ioV7v%2BZnHpJhQW5zVmSJal5ZAV0SimWXFC4nVdnRaLxg0wa0xEaJJSPlGQvYKgc1PKHufijXwwg8keCvEQQX3bh8n2IpJEaRv8Rg4uTbfo3rjkgINMwFHhX3GjX%2BBp9PZ1gzBiePc7OU2N6FM0VqLgEAAA%3D%3D

SWC Info output

No response

Expected behavior

Should have definite property.

Actual behavior

No response

Version

1.3.100-nightly-20231125.1

Additional context

No response

@dsherret dsherret added the C-bug label Nov 25, 2023
@kdy1 kdy1 added this to the Planned milestone Nov 25, 2023
@kdy1 kdy1 self-assigned this Nov 27, 2023
@dsherret
Copy link
Contributor Author

I'm working on this. Will open a PR momentarily.

kdy1 pushed a commit that referenced this issue Jan 19, 2024
**Description:**

Adds a `definite` and `is_override` property to `AutoAccessor` as they were missing.
It also fixes codegen for `AutoAccessor` when emitting TypeScript (which is the main reason I need this PR).

**BREAKING CHANGE:**

Adds a `definite` and `is_override` property.

**Related issue:**

 - Closes #8344
@kdy1 kdy1 removed their assignment Jan 19, 2024
@kdy1 kdy1 closed this as completed in 572bcae Jan 21, 2024
@kdy1 kdy1 modified the milestones: Planned, v1.3.106 Jan 24, 2024
@swc-bot
Copy link
Collaborator

swc-bot commented Feb 23, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3 participants