mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Report a type mismatch in globals in a more meaningful position.
For example, this script reported the type mismatch in default: key k=0; default{timer(){}} Now it's reported at the semicolon, which is as early as it can be identified and much more meaningful.
This commit is contained in:
parent
dc98e477d7
commit
41149a17aa
1 changed files with 1 additions and 2 deletions
|
@ -2049,9 +2049,7 @@ list lazy_list_set(list L, integer i, list v)
|
|||
# Use LSL's dull global expression.
|
||||
value = self.Parse_simple_expr()
|
||||
self.expect(';')
|
||||
self.NextToken()
|
||||
else: # must be semicolon
|
||||
self.NextToken()
|
||||
value = None
|
||||
|
||||
assert self.scopeindex == 0
|
||||
|
@ -2059,6 +2057,7 @@ list lazy_list_set(list L, integer i, list v)
|
|||
if value is not None:
|
||||
value = self.autocastcheck(value, typ)
|
||||
decl['ch'] = [value]
|
||||
self.NextToken()
|
||||
self.AddSymbol('v', 0, name, Loc=len(self.tree), Type=typ)
|
||||
self.tree.append(decl)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue