-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump nimbus-build-system to use Nim v2.0.10 #2684
Conversation
newPayload issue is from #2685 |
Yeah, it's a type alias confusion: type
FixedBytes[N: static int] = distinct array[N, byte]
template makeFixedBytesN(N: static int) =
# Create specific numbered instantiations along with helpers
type `Bytes N` = FixedBytes[N]
const `zeroBytes N` = system.default(`Bytes N`)
template default(T: type `Bytes N`): `Bytes N` =
# reuse single constant for precomputed N
`zeroBytes N`
template `bytes N`(s: static string): `Bytes N` =
`Bytes N`.fromHex(s)
makeFixedBytesN(32)
type Hash32 = distinct Bytes32
const zeroHash32 = system.default(Hash32) ## Hash32 value consisting of all zeroes
template hash32(s: static string): Hash32 =
s.to(Hash32)
proc engine_newPayloadV3(parentBeaconBlockRoot: Hash32): int = 1
template newPayload(
parentBeaconBlockRoot: Bytes32): int =
engine_newPayloadV3(
parentBeaconBlockRoot)
0
#discard newPayload(default(Hash32))
discard newPayload(default(Bytes32)) |
If one tries to compile
|
Addressed by |
Related to nim-lang/Nim#24231 but distinct: it persists in the There's an obvious workaround of using |
I think the issue here is that not-provided arguments count for the disambiguation (in I think |
The But, yeah, it would be nicer not to require. |
No description provided.