Repository navigation
Conversation
… array lengths A type parameter used as a map key or set element only inside a select arm, an assignment place, or an array length was emitted as any, so go build rejected the key. Walk those positions when choosing the constraint. Co-authored-by: RPMFAN <RPMFAN@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2127
Summary
Fixes GUARANTEES.md Row 13 BUILDABLE when a generic type parameter
kis used as amap[k]vkey orset[k]element only insideselectarm header expressions, assignment target places, or array length expressions:SelectArmKind::Send { chan, value, .. }andSelectArmKind::Recv { chan, .. }insideStmt::SelectinEmitter::collect_comparable_in_stmt(compiler/crates/hy-emit/src/lib.rs).targets(PlaceKind::Index,PlaceKind::Deref,PlaceKind::Member) insideStmt::Assign.len: Option<Box<Expr>>insideTypeExpr::ArrayinEmitter::collect_comparable_in_ty.compiler/crates/hy-emit/tests/comparable_select_and_place.rs.Verification
cargo test -p hy-emit: passed.Payout Wallet (USDC on Base / EVM):
0x26AB46a0309C3ab8F2f59754B3066e77E8154A34