Aliases are already translated to the original type when running an aspect

@mh: as I told you friday evening.

Take the following code:

namespace x;
type MyAlias = double;

type MyClass = public Class
    public method q(a: MyAlias);

When I run an aspect on method q, the type of parameter a in the IMethodDefinition is double instead of x.MyAlias.

Another point of interest: Services.FindType can also not find the type x.MyAlias.

It does seem GetType/FindType doesn’t work. I’ve just fixed that , but other than that aliases seem fine:

There will be a separate GetAnyType/FindAnyType that can be used to find any type (as the return type signature changed for this, IType vs ITypeReference and I don’t want to introduce breaking changes)

Thanks - it works.

1 Like

You are right - I think I got confused because it did not find the type, causing the code to fail.
But indeed, the aliasses are still there.

So case closed.
Thank you very much.