Skip to content

Commit 8461ca9

Browse files
committed
remove unreachable trace_rune_duplicate error
1 parent c02bab8 commit 8461ca9

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

documentation/docs/98-reference/.generated/compile-errors.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -970,12 +970,6 @@ A `<textarea>` can have either a value attribute or (equivalently) child content
970970
`<title>` can only contain text and {tags}
971971
```
972972

973-
### trace_rune_duplicate
974-
975-
```
976-
`$inspect.trace` must only be used once within the same block statement
977-
```
978-
979973
### trace_rune_invalid_argument
980974

981975
```

packages/svelte/messages/compile-errors/script.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,6 @@ It's possible to export a snippet from a `<script module>` block, but only if it
186186
187187
Using a `$` prefix to refer to the value of a store is only possible inside `.svelte` files, where Svelte can automatically create subscriptions when a component is mounted and unsubscribe when the component is unmounted. Consider migrating to runes instead.
188188

189-
## trace_rune_duplicate
190-
191-
> `$inspect.trace` must only be used once within the same block statement
192-
193189
## trace_rune_invalid_argument
194190

195191
> `$inspect.trace` requires a string argument for the trace name

packages/svelte/src/compiler/errors.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -469,15 +469,6 @@ export function store_invalid_subscription_module(node) {
469469
e(node, "store_invalid_subscription_module", `Cannot reference store value outside a \`.svelte\` file\nhttps://svelte.dev/e/store_invalid_subscription_module`);
470470
}
471471

472-
/**
473-
* `$inspect.trace` must only be used once within the same block statement
474-
* @param {null | number | NodeLike} node
475-
* @returns {never}
476-
*/
477-
export function trace_rune_duplicate(node) {
478-
e(node, "trace_rune_duplicate", `\`$inspect.trace\` must only be used once within the same block statement\nhttps://svelte.dev/e/trace_rune_duplicate`);
479-
}
480-
481472
/**
482473
* `$inspect.trace` requires a string argument for the trace name
483474
* @param {null | number | NodeLike} node

packages/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ export function CallExpression(node, context) {
157157
) {
158158
e.trace_rune_invalid_location(node);
159159
}
160-
if (context.state.scope.tracing) {
161-
e.trace_rune_duplicate(node);
162-
}
163160

164161
if (dev) {
165162
context.state.scope.tracing = node.arguments[0].value;

0 commit comments

Comments
 (0)