Skip to content

Commit

Permalink
Fix a build break on Go < 1.14
Browse files Browse the repository at this point in the history
This was the error:

ui/ui.go:517:2: duplicate method Length
ui/ui.go:546:39: rowFocusTableWidget.Length is ambiguous
ui/ui.go:546:39: cannot use res (type *rowFocusTableWidget) as type list.IBoundedWalker in argument to list.NewBounded:
	*rowFocusTableWidget does not implement list.IBoundedWalker (missing Length method)
ui/ui.go:640:39: psmlTableRowWidget.Length is ambiguous
ui/ui.go:640:39: cannot use res (type *psmlTableRowWidget) as type list.IBoundedWalker in argument to list.NewBounded:
	*psmlTableRowWidget does not implement
	list.IBoundedWalker (missing Length method)

Go 1.14 allows this ambiguity by taking the set union of interface
methods.
  • Loading branch information
gcla committed Jul 19, 2020
1 parent 69b9111 commit 86c7df9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,9 @@ type iRowFocusTableWidgetNeeds interface {
table.IFocus
table.IGoToMiddle
table.ISetFocus
table.ISetPos
list.IWalkerHome
list.IWalkerEnd
SetPos(pos list.IBoundedWalkerPosition, app gowid.IApp)
FocusXY() (table.Coords, error)
SetFocusXY(gowid.IApp, table.Coords)
SetModel(table.IModel, gowid.IApp)
Expand Down

0 comments on commit 86c7df9

Please sign in to comment.