Skip to content

Commit

Permalink
💚 ci: fix ci test build error on go1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jun 29, 2023
1 parent 7a83b80 commit e28092b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions comdef/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ type Uint interface {
}

// Xint interface type. alias of Integer
type Xint = Integer
type Xint interface {
Int | Uint
}

// Integer interface type. all int or uint types
type Integer interface {
Expand Down Expand Up @@ -43,7 +45,12 @@ type SortedType interface {
}

// Compared type. alias of constraints.ScalarType
type Compared = ScalarType
//
// TODO: use type alias, will error on go1.18 Error: types.go:50: interface contains type constraints
// type Compared = ScalarType
type Compared interface {
Int | Uint | Float | ~string | ~bool
}

// ScalarType interface type.
//
Expand Down

0 comments on commit e28092b

Please sign in to comment.