fix Issue 12310 - [CTFE] Support heap allocation for built-in scalar types