Skip to content

cmd/compile: slicing rules too restrictive for generic slice operands #49566

@griesemer

Description

@griesemer

Reminder issue.

Currently not permitted (no structural type):

func _[S []byte|string](s S, i, j int) S {
   return s[i : j]
}

A little bit tricky to get right because we sometimes have to preserve the string type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions