blob: 1d4cf4fab66492652c30e6234c42c22143a55164 [file] [view]
---
title: NonSliceableOperand
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. -->
```
NonSliceableOperand occurs when a slice operation is applied to a value
whose type is not sliceable, or is unaddressable.
Example:
var x = [...]int{1, 2, 3}[:1]
Example:
var x = 1
var y = 1[:1]
```