Skip to content

Conversation

grynspan
Copy link
Contributor

On 64-bit targets, if withUnsafeTemporaryAllocation(of:capacity:) is called with parameters that produce a byte count too large to fit in Int, a compile-time error is emitted. This change enables the same error for targets with smaller bit widths for Int (i.e. 32-bit.)

…afeTemporaryAllocation(of:capacity:) byte count overflows
@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan grynspan requested a review from kubamracek October 29, 2021 15:21
Copy link
Member

@lorentey lorentey left a comment

Choose a reason for hiding this comment

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

Oh good catch!

@grynspan grynspan merged commit aa54818 into main Nov 1, 2021
@grynspan grynspan deleted the jgrynspan/temporary-allocation-compile-time-error-for-32-bit-overflow branch November 1, 2021 16:41
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