Skip to content

Bug: Getting a substring never causes 'out of index' error #543

Closed
@hajimehoshi

Description

@hajimehoshi

http://www.gopherjs.org/play/#/S6teI-bnkF

package main

import (
    "fmt"
)

func main() {
    str := "foo"
    fmt.Println(str[0:999])
}

This should cause an error panic: runtime error: slice bounds out of range but not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions