You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
Version
3.2.31
Reproduction link
github.com branch
compiler-sfc-attr-binding
Steps to reproduce
yarn
src/App.vue
. In this file there is an<input>
contains 2 equivalent attribute binding syntaxes^<name>
and:<name>.attr
yarn test
What is expected?
Since these 2 attribute binding syntaxes are equivalent, the AST node should have similar
type
, which istype 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 thattype: 6
applies to syntax^<name>
whiletype 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#1047The text was updated successfully, but these errors were encountered: