mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-24 04:08:32 +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.
|
# File both problems as issues.
|
||||||
error "SSZ serialization of the type " & humaneTypeName(T) & " is not supported"
|
error "SSZ serialization of the type " & humaneTypeName(T) & " is not supported"
|
||||||
|
|
||||||
template ElemType*(T: type[HashArray]): untyped =
|
template ElemType*(T: type HashArray): untyped =
|
||||||
type(default(T).data[0])
|
T.T
|
||||||
|
|
||||||
template ElemType*(T: type[HashList]): untyped =
|
template ElemType*(T: type HashList): untyped =
|
||||||
type(default(T).data[0])
|
T.T
|
||||||
|
|
||||||
template ElemType*(T: type[array]): untyped =
|
template ElemType*(T: type array): untyped =
|
||||||
type(default(T)[low(T)])
|
type(default(T)[low(T)])
|
||||||
|
|
||||||
template ElemType*(T: type[seq|List]): untyped =
|
template ElemType*(T: type seq): untyped =
|
||||||
type(default(T)[0])
|
type(default(T)[0])
|
||||||
|
|
||||||
|
template ElemType*(T: type List): untyped =
|
||||||
|
T.T
|
||||||
|
|
||||||
func isFixedSize*(T0: type): bool {.compileTime.} =
|
func isFixedSize*(T0: type): bool {.compileTime.} =
|
||||||
mixin toSszType, enumAllSerializedFields
|
mixin toSszType, enumAllSerializedFields
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user