--- Comment #1 from 2010-05-01 11:14:41 PDT ---
Created an attachment (id=616)
enable __traits in D1

I figured it was unfair to leave all the work to Walter, so I wrote a patch.

It was simple: mostly I had to remove a bunch of "#if DMDV2", and copy some
missing bits from the D2 source tree (which is slightly different from the D1
tree, whatever). The D1 traits.c file was outdated (I don't know why), so I
just appended D2's traits.c to it (to keep the diff non-confusing). Note that I
still made s small change to the copied part, oh well.

I tried all examples from, and all
seemed to work correctly. Note that you can't write "auto b = [
__traits(allMembers, D) ];" in D1, instead you have to use "char[][] b = [
__traits(allMembers, D) ];" (array type inference was changed in D2).

This patch is against the dmd 1.059 Beta, which (probably) corresponds dmd svn
revision 461.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to