digitalmars.D.learn - bugzilla issue 8434? Confusing error message?
- Charles Hixson (16/16) Jan 09 2013 ...$ dmd -unittest bptree.d
- Charles Hixson (4/20) Jan 10 2013 dnLftLnk is an array.
- Era Scarecrow (10/13) Jan 10 2013 It's an array. Fixed arrays have a numeric value inside the
- Charles Hixson (2/12) Jan 10 2013 Thanks. Good to have that guess confirmed.
...$ dmd -unittest bptree.d Error: cannot implicitly convert expression (this.dnLftLnk) of type BPNode[7LU] to bptree.BPNode Type BPNode is only declared once, although the error message refers to: if (ndx == -1) node = dnLftLnk; a place where it is an out parameter in a function declared: bool search (BPKey key, out BPNode node, out int ndx) { ... } bptree.d is the name of the file that contains both the declaration and the function. The compiler version is: ...$ dmd DMD64 D Compiler v2.060 The environment is linux (debian testing).
Jan 09 2013
dnLftLnk is an array. (It's still a confusing error message. I assume that "[7LU]" indicates that it's an array, but if so, I don't know where it's documented.) On 01/09/2013 06:36 PM, Charles Hixson wrote:....$ dmd -unittest bptree.d Error: cannot implicitly convert expression (this.dnLftLnk) of type BPNode[7LU] to bptree.BPNode Type BPNode is only declared once, although the error message refers to: if (ndx == -1) node = dnLftLnk; a place where it is an out parameter in a function declared: bool search (BPKey key, out BPNode node, out int ndx) { .... } bptree.d is the name of the file that contains both the declaration and the function. The compiler version is: ....$ dmd DMD64 D Compiler v2.060 The environment is linux (debian testing).
Jan 10 2013
On Thursday, 10 January 2013 at 21:53:27 UTC, Charles Hixson wrote:(It's still a confusing error message. I assume that "[7LU]" indicates that it's an array, but if so, I don't know where it's documented.)It's an array. Fixed arrays have a numeric value inside the brackets, the LU is because it's a 64bit compiler/machine (size_t being long), otherwise it would say [7u]. I have similar problems sometimes, if the sizes match perfectly you won't have problems (and will copy), if they don't you can make a slice out of it and pass it. I'm not sure if it's specifically documented, more like how it's seem to the compiler (for type checking).
Jan 10 2013
On 01/10/2013 02:15 PM, Era Scarecrow wrote:On Thursday, 10 January 2013 at 21:53:27 UTC, Charles Hixson wrote:Thanks. Good to have that guess confirmed.(It's still a confusing error message. I assume that "[7LU]" indicates that it's an array, but if so, I don't know where it's documented.)It's an array. Fixed arrays have a numeric value inside the brackets, the LU is because it's a 64bit compiler/machine (size_t being long), otherwise it would say [7u]. I have similar problems sometimes, if the sizes match perfectly you won't have problems (and will copy), if they don't you can make a slice out of it and pass it. I'm not sure if it's specifically documented, more like how it's seem to the compiler (for type checking).
Jan 10 2013