mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 22:13:39 +00:00
compiler: compare slice against nil
This commit is contained in:
Vendored
+2
@@ -1,9 +1,11 @@
|
||||
foo is nil? false false
|
||||
foo: len=4 cap=4 data: 1 2 4 5
|
||||
bar: len=3 cap=5 data: 0 0 0
|
||||
foo[1:2]: len=1 cap=3 data: 2
|
||||
sum foo: 12
|
||||
copy foo -> bar: 3
|
||||
bar: len=3 cap=5 data: 1 2 4
|
||||
slice is nil? true true
|
||||
grow: len=0 cap=0 data:
|
||||
grow: len=1 cap=1 data: 42
|
||||
grow: len=3 cap=4 data: 42 -1 -2
|
||||
|
||||
Reference in New Issue
Block a user