Ask Epic: Verse - March 28 @ 10:00 AM ET

For writes like:

var X:[int]int = map{}
if {set X[0] = 1}

the set will never fail, and you can ignore the possible failure the compiler assumes may occur via if {...}. For:

struct1 := struct<computes>:
  Data1:int
  Data2:int
var X:[int]struct1 = map{}
set X[0].Data1 = 1

the set will always fail. Put another way, complete assignments of the particular entry in the map will never fail, but partial assignments may.

1 Like