Annotation of implements
is not properly type-checked
#3298
Labels
bug - typechecker
issue with typechecker
implements
is not properly type-checked
#3298
Version Information
vyper --version
): 0.3.8+commit.7ff8f307python --version
): 3.8.0What's your issue about?
At the moment,
visit_ImplementsDecl
relies on the fact that the object mapped tonode.annotation.id
in the namespace defines a methodvalidate_implements
to ensure that the given name corresponds to an interface.vyper/vyper/semantics/analysis/module.py
Lines 157 to 161 in 0a64906
It would probably be better to use
type_from_annotation
:This would also have the advantage to give better error messages for the 2 following cases:
AttributeError: 'Int' object has no attribute 'id'
AttributeError: 'StructT' object has no attribute 'validate_implements'
)The text was updated successfully, but these errors were encountered: