gcc/testsuite/gdc.test/fail_compilation/parse14745.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/parse14745.d(11): Error: function literal cannot be `immutable` |
| 5 | fail_compilation/parse14745.d(12): Error: function literal cannot be `const` |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | void test14745() |
| 10 | { |
| 11 | auto fp1 = function () pure immutable { return 0; }; |
| 12 | auto fp2 = function () pure const { return 0; }; |
| 13 | } |