Modify ↓
Opened 2 years ago
Last modified 3 months ago
#4005 assigned Bug
Empty ReDim make Autoit crash
| Reported by: | Pickwy | Owned by: | Jon |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.16.1 | Severity: | None |
| Keywords: | redim crash | Cc: | admin@… |
Description
Observed : Using the empty brackets syntax with ReDim hard crash the interpreter.
Expected : Runtime error or no change to Array
Local $Dummy[] = [1, 2, 3] ReDim $Dummy ;Do nothing at all ReDim $Dummy[] ;Crash
Attachments (0)
Change History (5)
comment:1 by , 23 months ago
follow-up: 3 comment:2 by , 23 months ago
Both ReDim throw a syntax error in SciTe. What do you expect more?
comment:3 by , 23 months ago
Replying to Andreik:
Both ReDim throw a syntax error in SciTe. What do you expect more?
AutoIt3 shouldn't hard crash.
comment:4 by , 23 months ago
I understand and it should be treated more elegant as a runtime error. My point was if you write invalid code then it's a high chance to get bad or unexpected behavior. By the way, are you allowed to compile from SciTe if you have syntax errors?
Note:
See TracTickets
for help on using tickets.

Issue confirmed.
IMHO: AutoIt should throw AutoIt error something like:
Array ReDim has not set number of subscripts.