code: private Environment checkWhile(Stmt.While stmt, Environment environment, EnclosingScope scope) {
  		// Type loop invariant(s).
  		checkConditions(stmt.getInvariant(), true, environment);
  		// Type condition assuming its true to represent inside a loop
  		// iteration.
  		// Important if condition contains a type test, as we'll know it holds.
  		Environment trueEnvironment = checkCondition(stmt.getCondition(), true, environment);
  		// Type condition assuming its false to represent the terminated loop.
  		// Important if condition contains a type test, as we'll know it doesn't
  		// hold.
  		Environment falseEnvironment = checkCondition(stmt.getCondition(), false, environment);
  		// Type loop body using true environment
  		checkBlock(stmt.getBody(), trueEnvironment, scope);
  		// Determine and update modified variables
  		Tuple<Decl.Variable> modified = FlowTypeUtils.determineModifiedVariables(stmt.getBody());
  		stmt.setModified(stmt.getHeap().allocate(modified));
  		// Return false environment to represent flow after loop.
  		return falseEnvironment;
  	}
docs: Type check a <code>whiley</code> statement.
  
  @param stmt
  Statement to type check
  @param environment
  Determines the type of all variables immediately going into this
  block
  @return
  @throws ResolveError
  If a named type within this statement cannot be resolved within
  the enclosing project.