Index: src/AST/Pass.impl.hpp
===================================================================
--- src/AST/Pass.impl.hpp	(revision 5d3d281c4eabcd465b84b7b5001ee86b376872d1)
+++ src/AST/Pass.impl.hpp	(revision 532c0cdf854a68fe4bfc7de28c87688b31f9c5ed)
@@ -218,7 +218,7 @@
 	__pass::resultNstmt<container_t> new_kids;
 	for ( auto value : enumerate( statements ) ) {
+		size_t i = value.idx;
+		const Stmt * stmt = value.val;
 		try {
-			size_t i = value.idx;
-			const Stmt * stmt = value.val;
 			__pedantic_pass_assert( stmt );
 			const ast::Stmt * new_stmt = stmt->accept( *this );
@@ -246,5 +246,11 @@
 			new_kids.take_all( stmts_after );
 		} catch ( SemanticErrorException &e ) {
+			if ( auto dstmt = dynamic_cast<const DeclStmt *>( stmt ) ) {
+				assert( dstmt->decl->unique() );
+				auto & declLink = const_cast< ptr<Decl> & >( dstmt->decl );
+		  if ( !__pass::on_error (core, declLink, 0) ) goto handled;
+			}
 			errors.append( e );
+		  handled:;
 		}
 	}
