Skip to content

auto reference for typed CompositeLit #2484

@xushiwei

Description

@xushiwei

In most cases, when a struct T is passed as an argument to a function f, it is typically passed as a pointer (*T), i.e., f &T{...}. We hope that when passing a typed CompositeLit (such as T{...}) to function f, it can automatically reference the CompositeLit. That is, f T{...} is equivalent to f &T{...}.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions