Initial value not allowed for feature not embedded in outer feature
This error happens when defining a 'top-level' field e.g. my_field in e.g. lib/io/file.fz.
The outer feature should here be io. So the feature would be io.my_field and thus have an outer feature.
This is forbidden since this it is undefined in which order such fields should be initialized causing ambiguity as in
file a.fz:
m1 := time.nano.read
file b.fz:
m2 := time.nano.read
if m1 < m2 then panic "should this panic?"
Unless there is a very good reason, I would like to avoid ambiguity like this. Introducing some hidden logic (like using the file names in alphabetical order) would probably not be a nice solution.
That makes sense. But the error message is misleading then, so I'm leaving this open for improving the error message.