Bug 9288 – Parameter(Identifier|DefaultValue)Tuple report pointless errors

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-09T16:36:00Z
Last change time
2013-01-10T05:02:58Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-01-09T16:36:20Z
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
Comment #1 by k.hara.pg — 2013-01-09T16:42:38Z
Comment #2 by github-bugzilla — 2013-01-10T05:02:56Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/f6f57530a64c045c434a473efcd6492d60711068 fix Issue 9288 - Parameter(Identifier|DefaultValue)Tuple report pointless errors https://github.com/D-Programming-Language/phobos/commit/bfb6d3d2f386abedbc9aaa850665234d040a0731 Merge pull request #1064 from 9rnsr/fix9288 Issue 9288 - Parameter(Identifier|DefaultValue)Tuple report pointless errors