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

fix[lang]: exports for inline interfaces #3960

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion vyper/semantics/analysis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ def get_expr_info(self, node: vy_ast.VyperNode, is_callable: bool = False) -> Ex
if isinstance(t, ModuleInfo):
return ExprInfo.from_moduleinfo(t, attr=attr)

if isinstance(t, TYPE_T):
t = t.typedef

return info.copy_with_type(t, attr=attr)

# If it's a Subscript, propagate the subscriptable varinfo
Expand Down Expand Up @@ -197,7 +200,10 @@ def _raise_invalid_reference(name, node):
try:
s = t.get_member(name, node)

if isinstance(s, (VyperType, TYPE_T)):
if isinstance(s, VyperType):
if isinstance(s, TYPE_T):
s = s.typedef

# ex. foo.bar(). bar() is a ContractFunctionT
return [s]

Expand Down Expand Up @@ -391,6 +397,7 @@ def types_from_Name(self, node):
# attribute conditions, like Flag.foo or MyStruct({...})
return [TYPE_T(t)]

# it's a VarInfo
return [t.typ]

except VyperException as exc:
Expand Down
2 changes: 1 addition & 1 deletion vyper/semantics/types/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def abi_type(self) -> ABIType:
"""
The ABI type corresponding to this type
"""
raise CompilerPanic("Method must be implemented by the inherited class")
raise CompilerPanic(f"unimplemented method: `abi_type` (`{self}`)")

def get_size_in(self, location: DataLocation):
if location in (DataLocation.STORAGE, DataLocation.TRANSIENT):
Expand Down
2 changes: 1 addition & 1 deletion vyper/semantics/types/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_type_member(self, attr, node):

@property
def getter_signature(self):
return (), AddressT()
return (), self

@property
def abi_type(self) -> ABIType:
Expand Down
Loading