mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
compiler: add support for new language features of Go 1.17
This commit is contained in:
committed by
Ron Evans
parent
8e88e560a1
commit
255f35671d
@@ -42,6 +42,18 @@ func slicePanic() {
|
||||
runtimePanic("slice out of range")
|
||||
}
|
||||
|
||||
// Panic when trying to convert a slice to an array pointer (Go 1.17+) and the
|
||||
// slice is shorter than the array.
|
||||
func sliceToArrayPointerPanic() {
|
||||
runtimePanic("slice smaller than array")
|
||||
}
|
||||
|
||||
// Panic when calling unsafe.Slice() (Go 1.17+) with a len that's too large
|
||||
// (which includes if the ptr is nil and len is nonzero).
|
||||
func unsafeSlicePanic() {
|
||||
runtimePanic("unsafe.Slice: len out of range")
|
||||
}
|
||||
|
||||
// Panic when trying to create a new channel that is too big.
|
||||
func chanMakePanic() {
|
||||
runtimePanic("new channel is too big")
|
||||
|
||||
Reference in New Issue
Block a user