Files
modeling-app/rust/kcl-lib/tests/invalid_index_str/execution_error.snap
Jonathan Tran 2e754f2a11 BREAKING: Change to disallow indexing KCL records/objects with strings (#6529)
* Change to disallow indexing records/objects with strings

* Update output

* Remove outdated sim test

* Fix tests
2025-04-28 12:08:47 -04:00

14 lines
344 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
source: kcl-lib/src/simulation_tests.rs
description: Error from executing invalid_index_str.kcl
---
KCL Semantic error
× semantic: Only numbers (>= 0) can be indexes
╭─[2:5]
1 │ arr = [1, 2, 3]
2 │ x = arr["s"]
· ────┬───
· ╰── tests/invalid_index_str/input.kcl
╰────