Skip to content

Slice cap operation didn't check underlyingTypes#867

Merged
Dspil merged 3 commits intomasterfrom
dspil_slice_cap
Feb 27, 2025
Merged

Slice cap operation didn't check underlyingTypes#867
Dspil merged 3 commits intomasterfrom
dspil_slice_cap

Conversation

@Dspil
Copy link
Contributor

@Dspil Dspil commented Feb 27, 2025

The following example fails to typecheck without an explicit typecast:

type IP []byte

requires len(x) <= cap(x)
decreases _
pure func foo(x IP) bool

@Dspil Dspil requested a review from jcp19 February 27, 2025 09:38
@Dspil Dspil marked this pull request as draft February 27, 2025 09:51
@Dspil Dspil marked this pull request as ready for review February 27, 2025 09:57
Copy link
Contributor

@jcp19 jcp19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Dspil Dspil merged commit ce8d600 into master Feb 27, 2025
3 checks passed
@Dspil Dspil deleted the dspil_slice_cap branch February 27, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants