Just a clarification on what I told you earlier. By telling the compiler it was attached, I meant that the type of the expression of the object test was attached. This is why it gets optimized away.