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

[compiler-sfc]: Bug attribute binding syntaxes result in different AST nodes #5589

Open
ahnpnl opened this issue Mar 15, 2022 · 0 comments
Open

Comments

@ahnpnl
Copy link

ahnpnl commented Mar 15, 2022

Version

3.2.31

Reproduction link

github.com branch compiler-sfc-attr-binding

Steps to reproduce

  • Clone the repo
  • Install dependencies with yarn
  • Open src/App.vue. In this file there is an <input> contains 2 equivalent attribute binding syntaxes ^<name> and :<name>.attr
  • Run yarn test

What is expected?

Since these 2 attribute binding syntaxes are equivalent, the AST node should have similar type, which is type 7 and even better, the generated AST nodes should be the same.

What is actually happening?

After run yarn test in the reproduce repo, observe in the console that type: 6 applies to syntax ^<name> while type 7 applies to syntax :<name>.attr


Currently, because of this difference, it causes the issue for vue-tsc to perform type checking properly, see vuejs/language-tools#1047

@ahnpnl ahnpnl changed the title Attribute binding syntaxes result in different AST nodes with template compiler Template compiler: Attribute binding syntaxes result in different AST nodes Apr 15, 2022
@ahnpnl ahnpnl changed the title Template compiler: Attribute binding syntaxes result in different AST nodes [compiler-sfc]: Bug attribute binding syntaxes result in different AST nodes Apr 15, 2022
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

1 participant