if 4 in [1, 3, 4]: do something
My code in D
if (regionAlign in [RegionAlign.top, RegionAlign.bottom]) { ... }
throws an error:
incompatible types for (((cast(Widget)this).regionAlign()) in ([top, bottom])): 'RegionAlign' and 'RegionAlign[]'
if 4 in [1, 3, 4]: do something
My code in D
if (regionAlign in [RegionAlign.top, RegionAlign.bottom]) { ... }
throws an error:
incompatible types for (((cast(Widget)this).regionAlign()) in ([top, bottom])): 'RegionAlign' and 'RegionAlign[]'