[Issue 9288] New: Parameter(Identifier|DefaultValue)Tuple report pointless errors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 9 16:36:21 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9288

           Summary: Parameter(Identifier|DefaultValue)Tuple report
                    pointless errors
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-01-09 16:36:20 PST ---
After fixing bug8982, following code reports a lot of errors, but they are
pointless.

---
import std.traits;

struct Vector
{
    float x,y,z,w;
    immutable Vector one = Vector(1,1,1,1);
}

void func(int x = 10, ref const Vector v = Vector(1,1,1,1));

version(A)
pragma(msg, ParameterIdentifierTuple!func);
version(B)
pragma(msg, ParameterDefaultValueTuple!func);
---

With `-version=A`:

test.d(12): Error: Vector(1F, 1F, 1F, 1F) is not an lvalue
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(552): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(555): Error: template instance Get!(i) template 'Get'
is not defined

With `-version=B`:

test.d(12): Error: Vector(1F, 1F, 1F, 1F) is not an lvalue
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined
...\phobos\std\traits.d(634): Error: undefined identifier PT, did you mean
variable i?
...\phobos\std\traits.d(637): Error: template instance Get!(i) template 'Get'
is not defined

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list