Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Prev Previous commit
Next Next commit
Fixes
  • Loading branch information
JukkaL committed Jun 10, 2024
commit d92f2bd7eac32d0e08bab8c3883ec64e2ed53db7
2 changes: 2 additions & 0 deletions mypyc/irbuild/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
from mypyc.primitives.str_ops import str_slice_op
from mypyc.primitives.tuple_ops import list_tuple_op, tuple_slice_op

# Name and attribute references


def transform_name_expr(builder: IRBuilder, expr: NameExpr) -> Value:
if isinstance(expr.node, TypeVarLikeExpr) and expr.node.is_new_style:
Expand Down
4 changes: 4 additions & 0 deletions mypyc/irbuild/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
TryStmt,
TupleExpr,
TypeAliasExpr,
TypeAliasStmt,
TypeApplication,
TypedDictExpr,
TypeVarExpr,
Expand Down Expand Up @@ -249,6 +250,9 @@ def visit_nonlocal_decl(self, stmt: NonlocalDecl) -> None:
def visit_match_stmt(self, stmt: MatchStmt) -> None:
transform_match_stmt(self.builder, stmt)

def visit_type_alias_stmt(self, stmt: TypeAliasStmt) -> None:
self.bail('The "type" statement is not yet supported by mypyc', stmt.line)

# Expressions

def visit_name_expr(self, expr: NameExpr) -> Value:
Expand Down