Commit a11f6490 authored by Tom Niget's avatar Tom Niget

Disable dot for builtin promises

parent 32df7808
......@@ -3,7 +3,7 @@ import ast
from dataclasses import dataclass, field
from typing import List, Iterable
from transpiler.phases.typing.types import UserType, FunctionType
from transpiler.phases.typing.types import UserType, FunctionType, Promise
from transpiler.phases.utils import make_lnd
from transpiler.utils import compare_ast, linenodata
from transpiler.consts import SYMBOLS, PRECEDENCE_LEVELS, DUNDER_SYMBOLS
......@@ -212,7 +212,7 @@ class ExpressionVisitor(NodeVisitor):
yield ")"
def visit_Attribute(self, node: ast.Attribute) -> Iterable[str]:
if isinstance(node.type, FunctionType):
if isinstance(node.type, FunctionType) and not isinstance(node.value.type, Promise):
if node.value.type.resolve().is_reference:
yield "dotp"
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment