File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1330,8 +1330,6 @@ def test_curly_brace_after_primary_raises_immediately(self):
13301330 def test_assign_call (self ):
13311331 self ._check_error ("f() = 1" , "assign" )
13321332
1333- # TODO: RUSTPYTHON
1334- @unittest .expectedFailure
13351333 def test_assign_del (self ):
13361334 self ._check_error ("del (,)" , "invalid syntax" )
13371335 self ._check_error ("del 1" , "cannot delete literal" )
Original file line number Diff line number Diff line change @@ -852,6 +852,9 @@ impl Compiler {
852852 self . compile_delete ( element) ?;
853853 }
854854 }
855+ ast:: ExprKind :: BinOp { .. } | ast:: ExprKind :: UnaryOp { .. } => {
856+ return Err ( self . error ( CompileErrorType :: Delete ( "expression" ) ) )
857+ }
855858 _ => return Err ( self . error ( CompileErrorType :: Delete ( expression. node . name ( ) ) ) ) ,
856859 }
857860 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments