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

Postcondition violation is reported on wrong line. #26

Open
marcoeilers opened this issue Jun 26, 2016 · 0 comments
Open

Postcondition violation is reported on wrong line. #26

marcoeilers opened this issue Jun 26, 2016 · 0 comments

Comments

@marcoeilers
Copy link
Owner

Originally reported by: Vytautas Astrauskas (Bitbucket: vakaras, GitHub: vakaras)


For the following code:

#!python

from py2viper_contracts.contracts import *
from typing import Tuple


def test(a: int, b: int) -> Tuple[int, int]:
    Ensures(
        #:: UnexpectedOutput(postcondition.violated:assertion.false, /py2viper/issue/26/)
        ((True and
        True) and
        True) and
        #:: ExpectedOutput(postcondition.violated:assertion.false)
        #:: MissingOutput(postcondition.violated:assertion.false, /py2viper/issue/26/)
        (Result()[0] == a and
        Result()[1] == b)
        )
    return b, a

the postcondition violation is reported on line 8 while it should be reported on line 11.


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

No branches or pull requests

1 participant