Thanks to visit codestin.com
Credit goes to github.com

Skip to content

reflectx.SetRobust doesn't work with a pointer to a pointer, when the pointer is nil #1365

@rcoreilly

Description

@rcoreilly

Describe the bug

it calls UnderlyingPointer and then checks for nil, which it would be. Needs to handle the double-pointer case.

How to reproduce

The TableButton in tensorcore/values.go uses a *table.Table as its value, and passes a pointer to that pointer. This barfs on Bind.

This is in the goal branch -- not sure how it works in the base branch. All relevant test cases are in the goal branch.

Example code

No response

Relevant output

No response

Platform

macOS

Metadata

Metadata

Assignees

Labels

bugSomething isn't working correctlyconfirmedThis bug has been confirmed

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions