Open 0x2Adr1 opened 1 year ago
$ circle --version circle version 1.0.0-191 Circle public preview build 191 Built Apr 28 2023 16:55:43 (c) 2023 Sean Baxter https://www.circle-lang.org/ Twitter: @seanbax
#include <array> enum EPlanet { Venus = 0, }; struct CPlanet { const EPlanet planet; }; static const std::array<CPlanet, 1> planets = { { { .planet = EPlanet::Venus, }, } }; int main() { return 0; }
$ circle a.cpp -o foo Segmentation fault
Now replace enum EPlanet with enum class EPlanet and it compiles successfully.
enum EPlanet
enum class EPlanet
Now replace
enum EPlanet
withenum class EPlanet
and it compiles successfully.