return 'this'
endfunc
let val: string = GetValue()
+ " env var is always a string
+ let env = $TERM
END
writefile(lines, 'Xfinished')
source Xfinished
func GetValue()
return 'this'
endfunc
- let val = GetValue()
+ let val = GetValue()
END
CheckScriptFailure(lines, 'E1091:')
lines =<< trim END
vim9script
- let var = g:unkown
+ func GetValue()
+ return 'this'
+ endfunc
+ let val = [GetValue()]
+ END
+ CheckScriptFailure(lines, 'E1091:')
+
+ lines =<< trim END
+ vim9script
+ func GetValue()
+ return 'this'
+ endfunc
+ let val = {GetValue(): 123}
+ END
+ CheckScriptFailure(lines, 'E1091:')
+
+ lines =<< trim END
+ vim9script
+ func GetValue()
+ return 'this'
+ endfunc
+ let val = {'a': GetValue()}
+ END
+ CheckScriptFailure(lines, 'E1091:')
+
+ lines =<< trim END
+ vim9script
+ let var = g:unknown
END
CheckScriptFailure(lines, 'E1091:')