Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6855 from WalterBright/DIP1003
DIP1003: Remove body as a Keyword
- Loading branch information
Showing
5 changed files
with
190 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* TEST_OUTPUT: | ||
--- | ||
fail_compilation/failcontracts.d(18): Error: missing { ... } for function literal | ||
fail_compilation/failcontracts.d(18): Error: semicolon expected following auto declaration, not 'bode' | ||
fail_compilation/failcontracts.d(19): Error: function declaration without return type. (Note that constructors are always named 'this') | ||
fail_compilation/failcontracts.d(19): Error: no identifier for declarator test1() | ||
fail_compilation/failcontracts.d(19): Error: semicolon expected following function declaration | ||
fail_compilation/failcontracts.d(20): Error: semicolon expected following function declaration | ||
fail_compilation/failcontracts.d(22): Error: unexpected ( in declarator | ||
fail_compilation/failcontracts.d(22): Error: found 'T' when expecting ')' | ||
fail_compilation/failcontracts.d(22): Error: enum declaration is invalid | ||
fail_compilation/failcontracts.d(22): Error: found ')' instead of statement | ||
--- | ||
*/ | ||
|
||
void test() | ||
{ | ||
auto f1 = function() bode; | ||
auto test1() bode; | ||
auto test2()() bode; | ||
|
||
enum : int (int function() bode T); | ||
} | ||
|
Oops, something went wrong.