Order of fields in the `.Struct.fields` array

I can’t find any official word about it in any official documentation, but I’m fairly confident that when you use @typeInfo to reflect on a type, the order of fields, decls and other members is guaranteed to be the same as the order they were declared in source.

At the very least, the compiler has behavior tests that assert that the order is correct:

3 Likes