mirror of https://github.com/sveltejs/svelte
fix: emit right error for a shadowed invalid rune (#15892)
Co-authored-by: 7nik <kifiranet@gmail.com>pull/15900/head
parent
1cab761110
commit
df03af2e9d
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: emit right error for a shadowed invalid rune
|
@ -0,0 +1,8 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
error: {
|
||||||
|
code: 'rune_invalid_name',
|
||||||
|
message: '`$state.foo` is not a valid rune'
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,5 @@
|
|||||||
|
class State {
|
||||||
|
value = $state.foo();
|
||||||
|
}
|
||||||
|
|
||||||
|
export const state = new State();
|
Loading…
Reference in new issue