detect unsafe casts when inlining constructors to support abstract constructor inlining