Project

General

Profile

Bug #177

On Error Goto 100 ... or On Error Goto ERRLABEL cause compiler to crash.

Added by Brian Flanagan about 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
High
Target version:
Start date:
02/13/2020
Due date:
% Done:

0%

Estimated time:
24:00 h
Affected version:

Description

Complete examples below:

With Line Number:

On Error Goto 100
Error 123
100 Print "Error: ";Errn

Result:

First pass...
Second pass...
main.aoz:1:1: Compiler error: crash during compilation: pass: 2
cannot read property '3' of undefined
typeerror: cannot read property '3' of undefined
    at object.specialcases.handleonerror (c:\snapshot\compiler\compiler.js:0:0)
    at secondpass (c:\snapshot\compiler\compiler.js:0:0)
    at object.module.exports.compile (c:\snapshot\compiler\compiler.js:0:0)
    at compile (c:\snapshot\compiler\aoz.js:0:0)
    at aoz (c:\snapshot\compiler\aoz.js:0:0)
    at object.<anonymous> (c:\snapshot\compiler\aoz.js:0:0)
    at module._compile (pkg/prelude/bootstrap.js:1261:22)
    at object.module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at module.load (internal/modules/cjs/loader.js:651:32)
    at trymoduleload (internal/modules/cjs/loader.js:591:12)

Internal error
Task failed, no code generated...

With Label:

On Error Goto ERRLABEL
Error 123
ERRLABEL: Print "Error: ";Errn

Result:

First pass...
Second pass...
main.aoz:1:1: Compiler error: crash during compilation: pass: 2
cannot read property '2' of undefined
typeerror: cannot read property '2' of undefined
    at object.specialcases.handleonerror (c:\snapshot\compiler\compiler.js:0:0)
    at secondpass (c:\snapshot\compiler\compiler.js:0:0)
    at object.module.exports.compile (c:\snapshot\compiler\compiler.js:0:0)
    at compile (c:\snapshot\compiler\aoz.js:0:0)
    at aoz (c:\snapshot\compiler\aoz.js:0:0)
    at object.<anonymous> (c:\snapshot\compiler\aoz.js:0:0)
    at module._compile (pkg/prelude/bootstrap.js:1261:22)
    at object.module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at module.load (internal/modules/cjs/loader.js:651:32)
    at trymoduleload (internal/modules/cjs/loader.js:591:12)

Internal error
Task failed, no code generated...
#1

Updated by Brian Flanagan about 4 years ago

  • Affected version changed from 0.9.5 to 0.9.5.1

Still a problem in 0.9.5.1.

#2

Updated by Laurant Weill over 3 years ago

  • Priority changed from Normal to High
#3

Updated by Brian Flanagan over 3 years ago

  • Estimated time set to 24:00 h
#4

Updated by Brian Flanagan over 3 years ago

  • Affected version changed from 0.9.5.1 to Beta RC3

Re-tested in Beta RC3.
Both commands still fail.

#5

Updated by Brian Flanagan over 3 years ago

Still broken.

#6

Updated by Francois Lionet over 3 years ago

  • Status changed from New to Resolved
  • Assignee set to Francois Lionet
  • Target version set to Beta 1

Fixed!

Also available in: Atom PDF