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

ATypeElementTypeWithType returns wrong values #168

Closed
ghost opened this issue May 6, 2018 · 2 comments · Fixed by #169
Closed

ATypeElementTypeWithType returns wrong values #168

ghost opened this issue May 6, 2018 · 2 comments · Fixed by #169

Comments

@ghost
Copy link

ghost commented May 6, 2018

Here's a minimal example:
Note: you'll need to make the constructor ATypeElementWithType(Object o) public in order for this to work, just for the test case.

import scenelib.annotations.el.*;
import scenelib.type.*;

public class TestEquals {
    public static void main (String[] args) throws Exception {
        ATypeElementWithType e = new ATypeElementWithType("hello");
        ATypeElementWithType a = e.clone();
        a.setType( new ArrayType(new DeclaredType("hello")));
        e.setType( new DeclaredType("hello"));
        System.out.println(a.equals(e));
    }
}

This will print true. This pull request fixes the issue: #167

@mernst
Copy link
Member

mernst commented May 16, 2018

Could you make this into a unit test that can be run in an automated way?
I suggest adding a new directory under annotation-tools/scene-lib/test for unit tests like this.

@ghost
Copy link
Author

ghost commented May 21, 2018

Updated the pull request with proposed changes and some fixes. I couldn't reply earlier because I wasn't reveiving notifications for comments on issues.

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

Successfully merging a pull request may close this issue.

1 participant