That's an actual line of code from $FAN_HOME/src/build/fan/BuildPod.fan. It appears to differ semantically from
ci.depends = depends.map { Depends(s) }
The latter shall result in runtime error because it will return Obj?[] when Depend[] is expected.
This one is mostly caused by "middle of the road" approach when some but not all types are resolved at compile time. AFAIK that's the second way to create List which has element type defined at runtime (the first being calling List.make).
vkuzkokov Wed 22 Sep 2010
This topic is closely related #1222 about
That
and generics in general. For example I have a list of pods asStr[]
and want to make themDepend[]
That's an actual line of code from
$FAN_HOME/src/build/fan/BuildPod.fan
. It appears to differ semantically fromThe latter shall result in runtime error because it will return
Obj?[]
whenDepend[]
is expected.This one is mostly caused by "middle of the road" approach when some but not all types are resolved at compile time. AFAIK that's the second way to create
List
which has element type defined at runtime (the first being callingList.make
).In short, I was surprised to find that out.