add Type.copy_expr
pass DCE define from main context to coreApi context
copy method body from the core class if it is omitted in @:coreApi class definition (closes #3285)