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

GhostReturns decorator does not typecheck #28

Open
marcoeilers opened this issue Jun 28, 2016 · 1 comment
Open

GhostReturns decorator does not typecheck #28

marcoeilers opened this issue Jun 28, 2016 · 1 comment

Comments

@marcoeilers
Copy link
Owner

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


The following:

#!python

from py2viper_contracts.contracts import *
from typing import Tuple


@GhostReturns(2)
def test() -> Tuple[int, int, int]:
    return 1, 2, 3

fails with error:

#!pytb
> bin/py2viper --log debug --verifier silicon tests/verification/issues/00028.py
Translation failed
tests/verification/issues/00028.py:5: error: Argument 1 has incompatible type Callable[[], Tuple[int, int, int]]; expected None
JVM activity report     :
        classes loaded       : 118
JVM has been shutdown

@marcoeilers
Copy link
Owner Author

Original comment by Marco Eilers (Bitbucket: meilers, GitHub: meilers):


This is a symptom of mypy bug 1551 (python/mypy#1551).

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