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 should never return null if implicit assertions are enabled #462

zyro23 opened this issue Dec 8, 2016 · 1 comment


Copy link

zyro23 commented Dec 8, 2016

expected behavior of (quoting the docs):

If implicit assertions are enabled (which they are by default). This method will only ever return a page instance or throw an AssertionError

void method calls in an at-checker do not get ast transformed, i.e. no assert(...):

now, if a static at-checker has a void method call as last BinaryExpression, that is cast to boolean, returning false (the void method call does not get ast transformed):

that false is mapped to null and returned by Browser.doAt(Page):

so we get no AssertionError, no Exception, just null. current does not change.

n.b. possible workaround is a simple true as last statement in the static at-checker.

Copy link

erdi commented Dec 9, 2016

Thanks for such detailed explanation of what the problem is, @zyro23. It is a bit of an edge case but it indeed does what the docs say it wouldn't do so it's clearly a bug and needs fixing.

@erdi erdi self-assigned this Jan 1, 2017
@erdi erdi added the Bug label Jan 1, 2017
@erdi erdi added this to the 1.1 milestone Jan 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants