---
source: kcl/src/simulation_tests.rs
description: Error from executing invalid_index_str.kcl
---
KCL Semantic error

  × semantic: Only integers >= 0 can be used as the index of an array, but
  │ you're using a string
   ╭─[2:5]
 1 │ arr = [1, 2, 3]
 2 │ x = arr["s"]
   ·     ────────
   ╰────
