Apparently it's not a bug, it's feature (I can't begin to fathom why)
At any rate, by replacing
writeln(mixin( "__traits(compiles, t." ~memberName ~" = ("
~typeof(__traits(getMember, T, memberName)).stringof ~").init)" ));
with
writeln(mixin( "__traits(compiles, t." ~memberName ~" = (typeof(
In plain English what I am trying to do:
I'm testing that the property can be set.
I.e.
class Foo
{
@property public Foo Subfoo() {}
@property public Foo Subfoo2() {}
@property public void Subfoo2(Foo f) {}
}
in the above class Subfoo can't be set, Subfoo2 can.
I'm testing it with
Foo f,
__trai
Congrats, looks much nicer and appealing.
The library documentation seems more readable as well (in my humble
opinion)!
It's going to be long as I'm going to post all the code...
Basically there is a bug in the type system or __traits when the program is
split in static lib and exe (as opposed to all in one).
My test case:
- I have a all in one console application which output "true true"
- I have a project with
Exactly!
But I was able to reproduce the bug this morning simply by splitting it in
an exe and lib, as I said.
Going to post it in another post!
"AliĆehreli" wrote in message news:iu2hbj$gb6$2...@digitalmars.com...
Are you trying to say that you can't reproduce it with this simplified
cod
I have code like that:
module main;
import std.variant;
import std.stdio;
import std.metastrings : Format;
import std.traits;
public mixin template property(T, string name)
{
mixin(Format!("private T _%s;
@property public T %s() { return _%s; }
@property
The following program crash with the following error:
std.variant.VariantException@std\variant.d(1161): Attempt to use an
uninitialized VariantN
module main;
import std.variant;
import std.stdio;
class Foo
{
}
int main(string[] argv)
{
Variant v1 = Variant.init;
write
Sorry for the late answer I was sick, and thanks for the fix!
It works indeed! :)
Now... on onto other bugs! :)
"Andrei Alexandrescu" wrote in message
news:itst81$1qbe$2...@digitalmars.com...
On 6/22/11 5:02 AM, Lloyd Dupont wrote:
Hi Andrei,
Thanks for the quick fix and w
exandrescu" wrote in message
news:itqb62$2e8i$1...@digitalmars.com...
On 6/21/11 9:05 AM, Lloyd Dupont wrote:
I have DMD2.053 on Windows 7 x64
The following program compiled and crash on the line where I compare v7
and v1
=
module main;
import std.variant;
import std.st
I have DMD2.053 on Windows 7 x64
The following program compiled and crash on the line where I compare v7 and
v1
=
module main;
import std.variant;
import std.stdio;
class Foo
{
}
int main(string[] argv)
{
Variant v1 = Variant.init;
Object o = new Foo();
Variant v7
I am working a reflection / introspection library (dynamic / at runtime, as
opposed to compile time with template and mixin).
Now I can create "PropertyInfo" classes for property with very little code
and it all works well.
I'm hitting a problem, trying to "register" all property of my class
I'm using VisualD with DMD 2.053 on Windows 7 x64
I am building a static library and an exe, both in D, both with unitest
turned on.
the executable link with the library and use a module in the library which
contains unitests
yet, when Irun it, only the unit test in the exe are running, no unitt
A new post.. still about visual studio experience...
http://galador.net/codeblog/post/2011/05/23/Discovering-D-and-Visual-Studio-(continued%E2%80%A6).aspx
"Lloyd Dupont" wrote in message news:ir5l9r$1gvh$1...@digitalmars.com...
I just wrote an article on my blog (not much happe
in message news:ir991l$1lu0$1...@digitalmars.com...
Reddit has killed your blog!
"Server is too busy"
On 21/05/11 3:08 AM, Lloyd Dupont wrote:
hay, I didn't know reddit!
some comments are quite funny!
"Walter Bright" wrote in message news:ir6aa1$2o0a$1...@digitalmars.com...
hay, I didn't know reddit!
some comments are quite funny!
"Walter Bright" wrote in message news:ir6aa1$2o0a$1...@digitalmars.com...
On 5/20/2011 4:58 AM, Lloyd Dupont wrote:
I just wrote an article on my blog (not much happening on it though, I
confess..)
Which should ex
e in message news:ir62sb$2a64$1...@digitalmars.com...
Lloyd Dupont Wrote:
Thanks for the feedback.
Hey I might give a new go at DFL then. I like Entice the designer support.
Well I could give a go at DWT as well, so I could make my own inform
opinion!
My initial conclusion my have been skewed
! :)
Will have a look this week, thanks for the correction.
Much worthy feedback if I can use the designer in the end! :)
"Jesse Phillips" wrote in message news:ir5u0m$20o9$1...@digitalmars.com...
Lloyd Dupont Wrote:
I just wrote an article on my blog (not much happening on it though,
I just wrote an article on my blog (not much happening on it though, I
confess..)
Which should explain to a .NET programmer how to have an easy and satisfying
start with D:
http://www.galador.net/codeblog/post/2011/05/20/D-for-NET-programmer.aspx
18 matches
Mail list logo