https://bugs.winehq.org/show_bug.cgi?id=57511
Bug ID: 57511 Summary: For loop where loop var is not defined throws error without context Product: Wine Version: 9.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs@winehq.org Reporter: francisdb@gmail.com Distribution: ---
Dim d: d = Array(1,2,3,4,5) 'Dim i For i = 0 To UBound(d) Wscript.Echo d(i) Next
/opt/wine-devel/bin/wine cscript test.vbs 0120:fixme:vbscript:assign_ident throw exception 0120:fixme:wscript:ActiveScriptSite_OnScriptError ()
on error resume next Dim d: d = Array(1,2,3,4,5) 'Dim i For i = 0 To UBound(d) Wscript.Echo d(i) Next If Err.Number <> 0 Then Wscript.Echo "Loop Error: " & Err.Number & " - at " & Err.Source & ": " & Err.Description Err.Clear End If
/opt/wine-devel/bin/wine cscript test.vbs 0120:fixme:vbscript:assign_ident throw exception 0120:fixme:vbscript:do_icall L"i" not found 0120:fixme:vbscript:interp_incc ref.type is not REF_VAR Loop Error: -2147467259 - at :