fix Issue 11423 - Error: new can only create structs, dynamic arrays or class objects, not _error_'s
Merge pull request #2710 from 9rnsr/fix11423

Issue 11423 - Error: new can only create structs, dynamic arrays or class objects, not _error_'s