Page MenuHomeFeedback Tracker

Enscript compile crash with template classes and another compille unit on the same line
Assigned, UrgentPublic

Description

I am unable to comprehend how this happens but here we go ... The code below causes the game to just crash and close. Both variants (one commented out) cause this.
It can be reproduced if a class with one or more template arguments and at least one class member is on the same line as another valid compiler unit, such as a function or global variable

class TemplateClass<Class T>{bool field;} void Something(){};
//class TemplateClass<Class T>{int field;}; int g_number = 42;

void main()
{   
    Print(new TemplateClass<int>());
}

The code itself is valid. If you split apart the troublesome bit into two separate lines like this, it works:

class TemplateClass<Class T>{bool field;}
void Something(){};

I have attached logs and dumps in the additional information section.

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Additional Information

Please forward to the Enfusion team, this needs debugging and fixing.

Event Timeline

Geez changed the task status from New to Assigned.Sep 21 2020, 1:10 PM