Skip to content

Find All References shows "Not a Reference" when different type aliases are used in the definition and declaration #4667

@sean-mcmanus

Description

@sean-mcmanus
// def.h
using myInt = int;
void func(myInt i);

// def.cpp
#include "def.h"
void func(int i) {}

// def_usage.cpp
#include "def.h"
void main()
{
    func(0);
}

Find All References is not resolving the type alias, causing the type checking to fail (definition and usage aren't references of each other). It seems like we should at least investigate to see if it's a quick fix or not (i.e. we might just be missing a call to resolving the type alias). Otherwise, the unification work might fix this if it involves extensive database look up work.

The workaround is to change the definition to use the same type alias as the declaration (which would usually be the recommended style).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions