File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2503,6 +2503,8 @@ public Starred(expr value, expr_context ctx)
25032503 internal Starred ( StarredExpression expr , expr_context ctx )
25042504 : this ( Convert ( expr . Value ) , ctx , null , null ) { }
25052505
2506+ internal override AstExpression Revert ( ) => new StarredExpression ( value ? . Revert ( ) ) ;
2507+
25062508 public expr_context ctx { get ; set ; }
25072509
25082510 public expr value { get ; set ; }
Original file line number Diff line number Diff line change @@ -1338,6 +1338,15 @@ def test_literal_eval_cp35572(self):
13381338 self .assertEqual (ast .literal_eval ('-1.1' ), - 1.1 )
13391339 self .assertEqual (ast .literal_eval ('+1.1' ), 1.1 )
13401340
1341+ def test_ipy3_gh686 (self ):
1342+ """https://github.com/IronLanguages/ironpython3/issues/686"""
1343+ # check that compiling ast.Starred works properly
1344+ x = ast .parse ("*a, = [1]" )
1345+ c = compile (x , "" , "exec" )
1346+ d = {}
1347+ exec (c , d )
1348+ self .assertEqual (d ["a" ], [1 ])
1349+
13411350def main ():
13421351 if __name__ != '__main__' :
13431352 return
You can’t perform that action at this time.
0 commit comments