widl: Don't allow coclass declaration in winrt mode.

This commit is contained in:
Jacek Caban 2015-08-07 15:41:32 +02:00 committed by Alexandre Julliard
parent 400ae39f7a
commit a99bb3468a
1 changed files with 20 additions and 4 deletions

View File

@ -2714,10 +2714,26 @@ static void check_statements(const statement_list_t *stmts, int is_inside_librar
if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry)
{
if (stmt->type == STMT_LIBRARY)
switch(stmt->type) {
case STMT_LIBRARY:
check_statements(stmt->u.lib->stmts, TRUE);
else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
break;
case STMT_TYPE:
switch(type_get_type(stmt->u.type)) {
case TYPE_INTERFACE:
check_functions(stmt->u.type, is_inside_library);
break;
case TYPE_COCLASS:
if(winrt_mode)
error_loc("coclass is not allowed in Windows Runtime mode\n");
break;
default:
break;
}
break;
default:
break;
}
}
}