Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile errors when using structs? #6

Closed
patrickjm opened this issue Aug 8, 2014 · 4 comments
Closed

Compile errors when using structs? #6

patrickjm opened this issue Aug 8, 2014 · 4 comments

Comments

@patrickjm
Copy link

I'm not quite sure why these are happening, but I think it's because I'm checking to see if two struct types are equal.

properties[0].should.equal(Property("test1", "test2"));

spawns:

Error: expression this.value of type Property does not have a boolean value ...dub\packages\pyjamas-0.0.4\source\pyjamas.d(8): Error: template instance pyjamas.Assertion!(Property) error instantiating source\reader.d(38): instantiated from here: should!(Property)

This didn't happen before I upgraded, so I'm assuming the bug was introduced recently.

@yamadapc
Copy link
Owner

yamadapc commented Aug 9, 2014

Yeah... This is due to the .exist method. I'm not sure of the usefulness of it for D. It'd basically check if references are or aren't null. I'll fix this today. It should be noted that this is very much a work-in-progress, but thanks a lot for reporting this, it helps a lot.
:)

yamadapc added a commit that referenced this issue Aug 9, 2014
This should close issue #6 and it bumps version to 0.0.5. I'm waiting
for @pataroose'ś feedback before closing it.
We should add better tests for struct and class instances usage.
@yamadapc
Copy link
Owner

yamadapc commented Aug 9, 2014

Okay... This should be fixed in 0.0.5. I still have a lot of fixes, improvements and features to add before this becomes as useful as I want. Thanks a lot for reporting and I'm sorry I didn't answer you yesterday!

@yamadapc
Copy link
Owner

I'm leaving it for you to close this.

@patrickjm
Copy link
Author

Regardless of it being a work in progress, it's been very useful to me thus far, so thanks for writing it (and, more specifically, getting this fixed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants