-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
I4No visible changesNo visible changesS4RoutineRoutineU3RegularRegularbugSomething isn't workingSomething isn't workingcompilerGo smart contract compilerGo smart contract compiler
Description
func TestSlice(t *testing.T) {
src := `package foo
func Main() byte {
a := make([]byte, 2)
b := a[:1]
b[0] = 42
return a[0]
}
`
eval(t, src, big.NewInt(42))
}
Current Behavior
Test returns 0.
Expected Behavior
Test should return 42.
Possible Solution
Perhaps you don't need to create a copy of the original slice when creating a subslice.
Steps to Reproduce
Run the test above.
Your Environment
v0.112.0
Metadata
Metadata
Assignees
Labels
I4No visible changesNo visible changesS4RoutineRoutineU3RegularRegularbugSomething isn't workingSomething isn't workingcompilerGo smart contract compilerGo smart contract compiler