You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code works as expected in Go, producing the output "ok 2". However, in Gno, it fails with a runtime panic and generates a lengthy stack trace.
package main
funcmain() {
variinterface{} = [2]int{0, 1}
consta=len(i.([2]int))
println("ok", a)
}
Expected Behavior
In Go, the code executes without errors and produces the output:
ok 2
This is because the len function correctly evaluates the length of the array type assertion i.([2]int) during compilation.
Actual Behavior
In Gno, the code fails with a runtime panic. The stack trace includes the following:
Description
The following code works as expected in Go, producing the output
"ok 2"
. However, in Gno, it fails with a runtime panic and generates a lengthy stack trace.Expected Behavior
In Go, the code executes without errors and produces the output:
This is because the
len
function correctly evaluates the length of the array type assertioni.([2]int)
during compilation.Actual Behavior
In Gno, the code fails with a runtime panic. The stack trace includes the following:
The text was updated successfully, but these errors were encountered: