Skip to content

Auto derefence square brackets #4886

@gopherbot

Description

@gopherbot

by Nick.Desaulniers:

What steps will reproduce the problem?
1. create a slice
2. create a pointer to the slice
3. append a value to the slice
4. access the pointer using square brackets

What is the expected output?
the appended value

What do you see instead?
invalid operation

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Mac OSX

Which version are you using?  (run 'go version')
go version go1.0.3

Please provide any additional information below.
Methods auto dereference pointers, why not square brackets?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions