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

__init__ function arguments types have no checks in the function body #35

Open
migeed-z opened this issue May 9, 2017 · 0 comments
Open

Comments

@migeed-z
Copy link
Collaborator

migeed-z commented May 9, 2017

It seems that Reticulated skips the init function argument checks in the function body.
In the following class definition:

@fields({'my_dict': Dict(Int, Tuple(Int, Int))})
class UnionFind:
    def __init__(self:UnionFind, my_dict:Dict(Int, Tuple(Int, Int)))->Void:
        self.my_dict = my_dict

There are no checks to verify that my_dict has the correct type.
This is the resulting code from retic -p:

class UnionFind:
    def __init__(self, my_dict):
        self.my_dict = my_dict
    __init__ = check_type_function(__init__)
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

1 participant