Skip to content
ricardoboss edited this page Nov 16, 2023 · 2 revisions

Invalid Index Operator Exception

Description

This error occurs when the index operator is used on a type that does not support it.

Example:

number a = 1

println(a[0])

Remediation

Ensure that the type supports the index operator.

- number a = 1
+ string a = "1"

  println(a[0])

or

- number a = 1
+ list a = [1]

  println(a[0])