-
-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
65 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
dmd now supports expressive diagnostic error messages with `-verrors=pretty` | ||
|
||
With the new CLI option `-verrors=pretty` dmd will now show the offending line directly in its error messages. | ||
Consider this faulty program `test.d`: | ||
|
||
--- | ||
void foo() | ||
{ | ||
|
||
a = 1; | ||
} | ||
--- | ||
|
||
Now run it with `-verrors=pretty`: | ||
|
||
$(CONSOLE | ||
> dmd -verrors=pretty test.d | ||
ee.d(5): $(RED Error): undefined identifier a | ||
a = 1; | ||
^ | ||
) |
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
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,15 @@ | ||
/* | ||
REQUIRED_ARGS: -verrors=pretty | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/fail_pretty_errors.d(14): Error: undefined identifier `a` | ||
a = 1; | ||
^ | ||
--- | ||
*/ | ||
|
||
void foo() | ||
{ | ||
|
||
a = 1; | ||
} |