private Environment checkAssign ( Stmt . Assign stmt , Environment environment , EnclosingScope scope ) throws IOException { Tuple < LVal > lvals = stmt . getLeftHandSide ( ) ; Type [ ] types = new Type [ lvals . size ( ) ] ; for ( int i = 0 ; i != lvals . size ( ) ; ++ i ) { types [ i ] = checkLVal ( lvals . get ( i ) , environment ) ; } checkMultiExpressions ( stmt . getRightHandSide ( ) , environment , new Tuple <> ( types ) ) ; return environment ; }
Type check an assignment statement .