Index: src/Concurrency/Keywords.cc
===================================================================
--- src/Concurrency/Keywords.cc	(revision 08e4e6a1759271a9927038cb8b6d639b85db3fde)
+++ src/Concurrency/Keywords.cc	(revision 13fdf866f7f954372ac020e1f9c2e07c7f3eb131)
@@ -422,6 +422,7 @@
 			;
 		else if ( auto param = isMainFor( decl, cast_target ) ) {
-			// This should never trigger.
-			assert( vtable_decl );
+			if ( !vtable_decl ) {
+				SemanticError( decl, context_error );
+			}
 			// Should be safe because of isMainFor.
 			StructInstType * struct_type = static_cast<StructInstType *>(
