  
  additional_catches:
  		non_empty_additional_catches { $$ = $1; }
-@@ -262,6 +281,30 @@
+@@ -262,6 +281,29 @@
  		unticked_class_declaration_statement	{ zend_do_ticks(TSRMLS_C); }
  ;
  

 static int ZEND_ADD_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
 {
 	zend_op *opline = EX(opline);
@@ -20920,6 +21181,18 @@
 	return zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_TMP(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
 }
 

+			zend_error(E_COMPILE_ERROR, "Cannot import class %s as class %s (declared in %s on line %d)", ce->name, (*pce)->name, (*pce)->filename, (*pce)->line_start);
+		} else {
+			zend_error(E_COMPILE_ERROR, "Cannot import class %s as class %s (internally declared)", ce->name, (*pce)->name);
+		}
+		/* Bails out */
+	}
+
