digitalmars.D.learn - Error: not a property - ?
- Era Scarecrow (12/12) Feb 09 2013 This is an unexpected error; Seems it's the result of not
- Jonathan M Davis (9/26) Feb 09 2013 It's not a bug. The assignment is illegal, because a you can't assign a ...
- Era Scarecrow (7/34) Feb 09 2013 I figured as much. Very difficult to figure out the culprit when
- Jonathan M Davis (3/5) Feb 09 2013 Just create a new bug report for it: http://d.puremagic.com/issues
- Era Scarecrow (4/10) Feb 09 2013 Found it's bug 5010; Added comment for that specific case.
This is an unexpected error; Seems it's the result of not down-casting a variable-type. Is this a bug? Or just need a better error message? Version: DMD32 D Compiler v2.061 struct S { void test(uint v) property {} void test2(ulong v) property {} } ulong x; S s; s.test2 = x; s.test = x; //s.test is not a property
Feb 09 2013
On Sunday, February 10, 2013 04:16:26 Era Scarecrow wrote:This is an unexpected error; Seems it's the result of not down-casting a variable-type. Is this a bug? Or just need a better error message? Version: DMD32 D Compiler v2.061 struct S { void test(uint v) property {} void test2(ulong v) property {} } ulong x; S s; s.test2 = x; s.test = x; //s.test is not a propertyIt's not a bug. The assignment is illegal, because a you can't assign a ulong to a uint without casting, but the error message obviously isn't very good. It probably gives that error whenever you try and use the property syntax, and there's no variable or function with that name that compiles with the given argument. It really should be indicating that the argument itself is invalid, but however the combination of lowering and error messages works, you end up with a less than helpful error message. - Jonathan M Davis
Feb 09 2013
On Sunday, 10 February 2013 at 03:24:37 UTC, Jonathan M Davis wrote:On Sunday, February 10, 2013 04:16:26 Era Scarecrow wrote:I figured as much. Very difficult to figure out the culprit when it's from bitfields mixed with perfectly normal code for assignment. Where should I add to the bug tracker so the error message can be improved?This is an unexpected error; Seems it's the result of not down-casting a variable-type. Is this a bug? Or just need a better error message? Version: DMD32 D Compiler v2.061 struct S { void test(uint v) property {} void test2(ulong v) property {} } ulong x; S s; s.test2 = x; s.test = x; //s.test is not a propertyIt's not a bug. The assignment is illegal, because a you can't assign a ulong to a uint without casting, but the error message obviously isn't very good. It probably gives that error whenever you try and use the property syntax, and there's no variable or function with that name that compiles with the given argument. It really should be indicating that the argument itself is invalid, but however the combination of lowering and error messages works, you end up with a less than helpful error message.
Feb 09 2013
On Sunday, February 10, 2013 04:38:56 Era Scarecrow wrote:Where should I add to the bug tracker so the error message can be improved?Just create a new bug report for it: http://d.puremagic.com/issues - Jonathan M Davis
Feb 09 2013
On Sunday, 10 February 2013 at 03:45:37 UTC, Jonathan M Davis wrote:On Sunday, February 10, 2013 04:38:56 Era Scarecrow wrote:Found it's bug 5010; Added comment for that specific case. http://d.puremagic.com/issues/show_bug.cgi?id=5010Where should I add to the bug tracker so the error message can be improved?Just create a new bug report for it: http://d.puremagic.com/issues - Jonathan M Davis
Feb 09 2013