File tree 3 files changed +20
-1
lines changed
test/validator/samples/binding-invalid-value-global
3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export default class Binding extends Node {
39
39
} else {
40
40
const variable = component . var_lookup . get ( name ) ;
41
41
42
- if ( ! variable ) component . error ( this . expression . node , {
42
+ if ( ! variable || variable . global ) component . error ( this . expression . node , {
43
43
code : 'binding-undeclared' ,
44
44
message : `${ name } is not declared`
45
45
} ) ;
Original file line number Diff line number Diff line change
1
+ [{
2
+ "code" : " binding-undeclared" ,
3
+ "message" : " foo is not declared" ,
4
+ "pos" : 58 ,
5
+ "start" : {
6
+ "line" : 4 ,
7
+ "column" : 19 ,
8
+ "character" : 58
9
+ },
10
+ "end" : {
11
+ "line" : 4 ,
12
+ "column" : 22 ,
13
+ "character" : 61
14
+ }
15
+ }]
Original file line number Diff line number Diff line change
1
+ <script >
2
+ console .log (foo);
3
+ </script >
4
+ <input bind:value ={foo }>
You can’t perform that action at this time.
0 commit comments