Index: src/Concurrency/Waituntil.cpp
===================================================================
--- src/Concurrency/Waituntil.cpp	(revision 66ac41611c6fecfda74f03f3afbceabd6af0a53f)
+++ src/Concurrency/Waituntil.cpp	(revision 1d66a916f973e84743f24206d3aa6d6aaefa5634)
@@ -178,5 +178,5 @@
     CompoundStmt * genStmtBlock( const WhenClause * clause, const ClauseData * data );
     Stmt * genElseClauseBranch( const WaitUntilStmt * stmt, string & runName, string & arrName, vector<ClauseData *> & clauseData );
-    Stmt * genNoElseClauseBranch( const WaitUntilStmt * stmt, string & satName, string & runName, string & arrName, string & pCountName, vector<ClauseData *> & clauseData );
+    Stmt * genNoElseClauseBranch( const WaitUntilStmt * stmt, string & runName, string & arrName, string & pCountName, vector<ClauseData *> & clauseData );
     void genClauseInits( const WaitUntilStmt * stmt, vector<ClauseData *> & clauseData, CompoundStmt * body, string & statusName, string & elseWhenName );
     Stmt * recursiveOrIfGen( const WaitUntilStmt * stmt, vector<ClauseData *> & data, vector<ClauseData*>::size_type idx, string & elseWhenName );
@@ -625,12 +625,4 @@
 CompoundStmt * GenerateWaitUntilCore::genStmtBlock( const WhenClause * clause, const ClauseData * data ) {
     const CodeLocation & cLoc = clause->location;
-    // return new CompoundStmt( cLoc, // OLD
-    //     {
-    //         new ExprStmt( cLoc,
-    //             genSelectTraitCall( clause, data, "on_selected" )
-    //         ),
-    //         ast::deepCopy( clause->stmt )
-    //     }
-    // );
     return new CompoundStmt( cLoc,
         {
@@ -827,6 +819,6 @@
     );
 }
-// C_TODO remove unused param if change kept
-Stmt * GenerateWaitUntilCore::genNoElseClauseBranch( const WaitUntilStmt * stmt, string & satName, string & runName, string & arrName, string & pCountName, vector<ClauseData *> & clauseData ) {
+
+Stmt * GenerateWaitUntilCore::genNoElseClauseBranch( const WaitUntilStmt * stmt, string & runName, string & arrName, string & pCountName, vector<ClauseData *> & clauseData ) {
     CompoundStmt * whileBody = new CompoundStmt( stmt->location );
     const CodeLocation & loc = stmt->location;
@@ -843,5 +835,4 @@
 
     whileBody->push_back( genStatusCheckFor( stmt, clauseData, runName ) );
-    // whileBody->push_back( genStatusCheckFor( stmt, clauseData, satName ) ); // OLD
 
     return new CompoundStmt( loc,
@@ -849,10 +840,7 @@
             new WhileDoStmt( loc,
                 genNotSatExpr( stmt, runName, arrName ),
-                // genNotSatExpr( stmt, satName, arrName ), // OLD
                 whileBody,  // body
                 {}          // no inits
             )
-            // , // OLD
-            // genStatusCheckFor( stmt, clauseData, runName ) // OLD
         }
     );
@@ -878,5 +866,10 @@
                 new ObjectDecl( cLoc,
                     currClause->targetName,
-                    new ReferenceType( new TypeofType( ast::deepCopy( stmt->clauses.at(i)->target ) ) ),
+                    new ReferenceType( 
+                        new TypeofType( new UntypedExpr( cLoc,
+                            new NameExpr( cLoc, "__CFA_select_get_type" ),
+                            { ast::deepCopy( stmt->clauses.at(i)->target ) }
+                        ))
+                    ),
                     new SingleInit( cLoc, ast::deepCopy( stmt->clauses.at(i)->target ) )
                 )
@@ -1290,9 +1283,9 @@
                 new NameExpr( stmt->else_cond->location, elseWhenName ),
                 genElseClauseBranch( stmt, runName, statusArrName, clauseData ),
-                genNoElseClauseBranch( stmt, satName, runName, statusArrName, pCountName, clauseData )
+                genNoElseClauseBranch( stmt, runName, statusArrName, pCountName, clauseData )
             )
         );
     } else if ( !stmt->else_stmt ) { // normal gen
-        tryBody->push_back( genNoElseClauseBranch( stmt, satName, runName, statusArrName, pCountName, clauseData ) );
+        tryBody->push_back( genNoElseClauseBranch( stmt, runName, statusArrName, pCountName, clauseData ) );
     } else { // generate just else
         tryBody->push_back( genElseClauseBranch( stmt, runName, statusArrName, clauseData ) );
