finished WriteStmtNode's typechecking