fix Issue 11472 - dmd segfaults on wrong code instead of giving error
Merge pull request #2744 from 9rnsr/fix11472

[REG2.064] Issue 11472 - dmd segfaults on wrong code instead of giving error