mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-23 21:41:34 +00:00
Before this change, the following code:
```odin
package strconcat
import "core:fmt"
import "core:slice"
main :: proc() {
a: [1]u8
s1: []u8 = {}
s2: []u8 = a[:0]
fmt.printfln("s1={} len(s1)={} raw_data(s1)={}", s1, len(s1), raw_data(s1))
fmt.printfln("s2={} len(s2)={} raw_data(s2)={}", s2, len(s2), raw_data(s2))
fmt.printfln("equal(s1, s2): {}", slice.equal(s1, s2))
fmt.printfln("simple_equal(s1, s2): {}", slice.simple_equal(s1, s2))
}
```
Produced the following output on my machine:
```
s1=[] len(s1)=0 raw_data(s1)=<nil>
s2=[] len(s2)=0 raw_data(s2)=0x7FFFED64F74F
equal(s1, s2): true
simple_equal(s1, s2): false
```
This commit fixes simple_equal's behaviour to match that of equal.