Fix AttrNoImplicitNullable inference in HHBBC
Summary:
The algorithm was ignoring static or private properties entirely (because those
cannot be overridden). This ignores the fact that even for static or private
properties, the JIT uses AttrNoImplicitNullable to determine whether InitNull
needs to be unioned into the assumed type of a property. Therefore, properties
which need the "implicit null" (like ones that hold collections) would not
receive it, causing assertions and crashed when hard prop type-hint enforcement
is enabled.
Fix this by not setting AttrNoImplicitNullable if the property has a system
initial value which is KindOfNull, regardless of whether its static or private.
Reviewed By: markw65
Differential Revision:
D13568847
fbshipit-source-id:
1d1bf32ffb2e981cf347688b8ba3cc863aafb00c