Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestMethod.IsAsync isn't true for ValueTask #4282

Open
Youssef1313 opened this issue Dec 8, 2024 · 1 comment
Open

TestMethod.IsAsync isn't true for ValueTask #4282

Youssef1313 opened this issue Dec 8, 2024 · 1 comment

Comments

@Youssef1313
Copy link
Member

Youssef1313 commented Dec 8, 2024

IsAsync property is public, but we never read it in production code. So the impact here is minimal.

Here, we only handle Task though.

bool isAsync = ReflectHelper.MatchReturnType(method, typeof(Task));

Also, in the following line it's always false:

var method = new TestMethod(classFullName, methodName, hierarchy, methodName, classFullName, assemblyLocation, false, null, TestIdGenerationStrategy.FullyQualified);

@Evangelink We should deprecate the public property and remove it completely IMO.

@Evangelink
Copy link
Member

Type is already part of the list of deprecated types (public for not well known reason).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants