mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-23 11:48:33 +00:00
work around type issues
This commit is contained in:
parent
4fc9a84c57
commit
a0b8b818f3
@ -236,18 +236,21 @@ macro unsupported*(T: typed): untyped =
|
||||
# File both problems as issues.
|
||||
error "SSZ serialization of the type " & humaneTypeName(T) & " is not supported"
|
||||
|
||||
template ElemType*(T: type[HashArray]): untyped =
|
||||
type(default(T).data[0])
|
||||
template ElemType*(T: type HashArray): untyped =
|
||||
T.T
|
||||
|
||||
template ElemType*(T: type[HashList]): untyped =
|
||||
type(default(T).data[0])
|
||||
template ElemType*(T: type HashList): untyped =
|
||||
T.T
|
||||
|
||||
template ElemType*(T: type[array]): untyped =
|
||||
template ElemType*(T: type array): untyped =
|
||||
type(default(T)[low(T)])
|
||||
|
||||
template ElemType*(T: type[seq|List]): untyped =
|
||||
template ElemType*(T: type seq): untyped =
|
||||
type(default(T)[0])
|
||||
|
||||
template ElemType*(T: type List): untyped =
|
||||
T.T
|
||||
|
||||
func isFixedSize*(T0: type): bool {.compileTime.} =
|
||||
mixin toSszType, enumAllSerializedFields
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user