digitalmars.D.learn - dstep/internal/Reflection.d:205:0 expression "objcObject_"c ==
- Robert Lumley (15/15) Jan 24 2012 hi all :) i'm new to D and i'm trying to get step to compile on
- Jacob Carlborg (6/21) Jan 24 2012 I don't know if you're using a D1 or D2 compiler but that project is for...
- Jacob Carlborg (6/31) Jan 24 2012 If you're interested in only that file it's available here as well and
hi all :) i'm new to D and i'm trying to get step to compile on
the Mac. below is the template that gives the error:
dstep/internal/Reflection.d:205:0 expression "objcObject_"c ==
cast(char[])field is not constant or does not evaluate to a bool
private template hasFieldImpl (T, string field, size_t i)
{
static if (T.tupleof.length == i)
const hasFieldImpl = false;
else static if (T.tupleof[i].stringof[1 + T.stringof.length + 2
.. $] == field)
const hasFieldImpl = true;
else
const hasFieldImpl = hasFieldImpl!(T, field, i + 1); }
there error is on the line else static..
thanks very much
Jan 24 2012
On 2012-01-24 09:43, Robert Lumley wrote:
hi all :) i'm new to D and i'm trying to get step to compile on the Mac.
below is the template that gives the error:
dstep/internal/Reflection.d:205:0 expression "objcObject_"c ==
cast(char[])field is not constant or does not evaluate to a bool
private template hasFieldImpl (T, string field, size_t i)
{
static if (T.tupleof.length == i)
const hasFieldImpl = false;
else static if (T.tupleof[i].stringof[1 + T.stringof.length + 2 .. $] ==
field)
const hasFieldImpl = true;
else
const hasFieldImpl = hasFieldImpl!(T, field, i + 1); }
there error is on the line else static..
thanks very much
I don't know if you're using a D1 or D2 compiler but that project is for
D1. But I have basically abandoned that project in favor of:
http://michelf.com/projects/d-objc/
--
/Jacob Carlborg
Jan 24 2012
On 2012-01-24 13:26, Jacob Carlborg wrote:On 2012-01-24 09:43, Robert Lumley wrote:If you're interested in only that file it's available here as well and should be working both with D1 and D2: https://github.com/jacob-carlborg/orange/blob/master/orange/util/Reflection.d -- /Jacob Carlborghi all :) i'm new to D and i'm trying to get step to compile on the Mac. below is the template that gives the error: dstep/internal/Reflection.d:205:0 expression "objcObject_"c == cast(char[])field is not constant or does not evaluate to a bool private template hasFieldImpl (T, string field, size_t i) { static if (T.tupleof.length == i) const hasFieldImpl = false; else static if (T.tupleof[i].stringof[1 + T.stringof.length + 2 .. $] == field) const hasFieldImpl = true; else const hasFieldImpl = hasFieldImpl!(T, field, i + 1); } there error is on the line else static.. thanks very muchI don't know if you're using a D1 or D2 compiler but that project is for D1. But I have basically abandoned that project in favor of: http://michelf.com/projects/d-objc/
Jan 24 2012








Jacob Carlborg <doob me.com>