blob: a6e106799c8a96c2e13c12ca1ec336e863ddaca7 [file] [view]
---
title: InvalidLitIndex
layout: article
---
<!-- Copyright 2023 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. -->
<!-- Code generated by generrordocs.go; DO NOT EDIT. -->
```
InvalidLitIndex occurs when the key in a key-value element of a slice or
array literal is not an integer constant.
Example:
var i = 0
var x = []string{i: "world"}
```