mirror of https://github.com/sveltejs/svelte
fix: throw on duplicate class field declarations (#16502)
* fix: throw on duplicate class field declarations * doh * handle assignment in constructor * fix * apply suggestion from review * fix * fix failing testpull/16500/head
parent
0bba84cc20
commit
b0f9ea3ae6
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: throw on duplicate class field declarations
|
@ -1,14 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "state_field_invalid_assignment",
|
||||
"message": "Cannot assign to a state field before its declaration",
|
||||
"code": "duplicate_class_field",
|
||||
"message": "`count` has already been declared",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 1
|
||||
"line": 5,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 12
|
||||
"line": 5,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in new issue