widl: Search for known types in current namespace.

Fixes the following error with this sample idl:

    #ifdef __WIDL__
    #pragma winrt ns_prefix
    #endif

    import "wtypes.idl";

    namespace Windows {
        [object]
        interface IFoo {}

        [object]
        interface IBar { HRESULT DoBar([in] IFoo *foo); }
    }

$ widl -o windows.foo.h windows.foo.idl
windows.foo.idl:13: error: type 'IFoo' not found

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2020-09-03 14:41:59 +02:00 committed by Alexandre Julliard
parent f222f56414
commit f4f612a077
1 changed files with 1 additions and 1 deletions

View File

@ -1959,7 +1959,7 @@ type_t *find_type(const char *name, struct namespace *namespace, int t)
static type_t *find_type_or_error(const char *name, int t)
{
type_t *type = find_type(name, NULL, t);
type_t *type = find_type(name, current_namespace, t);
if (!type) {
error_loc("type '%s' not found\n", name);
return NULL;