Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
October 07, 2011 [Issue 6785] New: Wrong error message from pragma(msg) of failed instantiation | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6785 Summary: Wrong error message from pragma(msg) of failed instantiation Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: minor Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-10-07 15:41:00 PDT --- This is wrong D2 code (there is no foo): void main() { enum int x = 1; pragma(msg, foo!x); } DMD 2.056head gives a partially wrong error message, that contains a "__error": test.d(3): Error: template instance foo!(x) template 'foo' is not defined __error -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 08, 2011 Re: [Issue 6785] New: Wrong error message from pragma(msg) of failed instantiation | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | On 08.10.2011 00:41, d-bugmail@puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=6785
>
> Summary: Wrong error message from pragma(msg) of failed
> instantiation
> Product: D
> Version: D2
> Platform: x86
> OS/Version: Windows
> Status: NEW
> Keywords: diagnostic
> Severity: minor
> Priority: P2
> Component: DMD
> AssignedTo: nobody@puremagic.com
> ReportedBy: bearophile_hugs@eml.cc
>
>
> --- Comment #0 from bearophile_hugs@eml.cc 2011-10-07 15:41:00 PDT ---
> This is wrong D2 code (there is no foo):
>
>
> void main() {
> enum int x = 1;
> pragma(msg, foo!x);
> }
>
>
> DMD 2.056head gives a partially wrong error message, that contains a "__error":
>
> test.d(3): Error: template instance foo!(x) template 'foo' is not defined
> __error
>
[Replying in the ng, because bugzilla is down]
The "__error" isn't part of the error message. It's coming from the pragma(msg): it's printing foo!x, and that's an error, so it prints "__error".
The real bug is that the pragma msg is still displayed, even when an error occurs while evaluating it. Maybe it should give an error
test.d(3): Error: template instance foo!(x) template 'foo' is not defined
test.d(3): Error: parameter for pragma(msg) must be a string
|
October 08, 2011 [Issue 6785] Wrong error message from pragma(msg) of failed instantiation | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6785 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clugdbug@yahoo.com.au --- Comment #1 from Don <clugdbug@yahoo.com.au> 2011-10-08 13:28:54 PDT --- The "__error" isn't part of the error message. It's coming from the pragma(msg): it's printing foo!x, and that's an error, so it prints "__error". The real bug is that the pragma msg is still displayed, even when an error occurs while evaluating it. Maybe it should give an error of the form: test.d(3): Error: template instance foo!(x) template 'foo' is not defined test.d(3): Error: parameter for pragma(msg) must be a string -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
March 01, 2012 [Issue 6785] Wrong error message from pragma(msg) of failed instantiation | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6785 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |bugzilla@digitalmars.com --- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2012-02-29 18:01:20 PST --- https://github.com/D-Programming-Language/dmd/pull/775 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
March 01, 2012 [Issue 6785] Wrong error message from pragma(msg) of failed instantiation | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6785 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation