Support Nim 1.2.x

This commit is contained in:
Mark Spanbroek 2022-09-12 14:30:57 +02:00 committed by markspanbroek
parent 1ac5eca540
commit f23f3e8aba
2 changed files with 3 additions and 2 deletions

View File

@ -61,7 +61,7 @@ func solidityType*(Tuple: type tuple): string =
names.add(solidityType(typeof parameter))
"(" & names.join(",") & ")"
func solidityType*(T: distinct type): string =
func solidityType*[T: distinct](_: type T): string =
solidityType(distinctBase T)
func signature*(function: string, Parameters: type tuple = ()): string =

View File

@ -4,7 +4,8 @@ import contractabi
import ./examples
type SomeDistinctType = distinct uint16
func `==`*(a, b: SomeDistinctType): bool {.borrow.}
func `==`*(a, b: SomeDistinctType): bool =
uint16(a) == uint16(b)
suite "ABI decoding":