Skip to content

reflect.DeepEqual error for empty slice and variadic #1147

@visualfc

Description

@visualfc

demo

package main

import (
	"reflect"
)

func test1(v ...string) {
	var names []string
	ret := reflect.DeepEqual(names, v)
	println(ret)
}

func test2(opt int, v ...string) {
	var names []string
	ret := reflect.DeepEqual(names, v)
	println(ret)
}

func main() {
	test1()
	test2(100)
}

gopherjs run main.go

output error

true
false

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions