pull/11294/head
Rich Harris 2 years ago
parent b394b16f19
commit 9f532fe80a

@ -1029,8 +1029,6 @@ function validate_no_const_assignment(node, argument, scope, is_binding) {
// TODO have a more specific error message for assignments to things like `{:then foo}` // TODO have a more specific error message for assignments to things like `{:then foo}`
const thing = 'constant'; const thing = 'constant';
console.log(binding);
if (is_binding) { if (is_binding) {
e.invalid_binding(node, thing); e.invalid_binding(node, thing);
} else { } else {

@ -1,7 +1,7 @@
[ [
{ {
"code": "invalid_binding", "code": "invalid_binding",
"message": "Invalid binding to const variable ($derived values, let: directives, :then/:catch variables and @const declarations count as const)", "message": "Cannot bind to constant",
"start": { "start": {
"line": 6, "line": 6,
"column": 9 "column": 9

@ -1,7 +1,7 @@
[ [
{ {
"code": "invalid_binding", "code": "invalid_binding",
"message": "Invalid binding to const variable ($derived values, let: directives, :then/:catch variables and @const declarations count as const)", "message": "Cannot bind to constant",
"start": { "start": {
"line": 6, "line": 6,
"column": 9 "column": 9

@ -1,7 +1,7 @@
[ [
{ {
"code": "invalid_binding", "code": "invalid_binding",
"message": "Invalid binding to const variable ($derived values, let: directives, :then/:catch variables and @const declarations count as const)", "message": "Cannot bind to constant",
"start": { "start": {
"line": 5, "line": 5,
"column": 9 "column": 9

@ -1,7 +1,7 @@
[ [
{ {
"code": "invalid_binding", "code": "invalid_binding",
"message": "Invalid binding to const variable ($derived values, let: directives, :then/:catch variables and @const declarations count as const)", "message": "Cannot bind to constant",
"start": { "start": {
"line": 6, "line": 6,
"column": 8 "column": 8

@ -1,7 +1,7 @@
[ [
{ {
"code": "invalid_assignment", "code": "invalid_assignment",
"message": "Cannot assign to constant ($derived values, let: directives, :then/:catch variables and @const declarations count as const)", "message": "Cannot assign to constant",
"start": { "start": {
"line": 7, "line": 7,
"column": 26 "column": 26

@ -1,7 +1,7 @@
[ [
{ {
"code": "invalid_binding", "code": "invalid_binding",
"message": "Invalid binding to const variable ($derived values, let: directives, :then/:catch variables and @const declarations count as const)", "message": "Cannot bind to constant",
"start": { "start": {
"line": 7, "line": 7,
"column": 9 "column": 9

Loading…
Cancel
Save