Falha: sintático vs. semântico

  if( condition ) {
component
= new ComponentA();
component
.onCreate();
} else
component
= new ComponentB();
component
.onCreate();