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

Mono: ConstructorInfo.ToString () returns unexpected format #36688

Closed
rolfbjarne opened this issue May 19, 2020 · 3 comments · Fixed by #38451
Closed

Mono: ConstructorInfo.ToString () returns unexpected format #36688

rolfbjarne opened this issue May 19, 2020 · 3 comments · Fixed by #38451
Assignees
Labels
area-System.Runtime runtime-mono specific to the Mono runtime
Milestone

Comments

@rolfbjarne
Copy link
Member

Example:

public class Application
{
	static void Main (string[] args)
	{
		Console.WriteLine (typeof (Application).GetConstructors ()[0]);
	}
}

Actual result:

.ctorVoid ()

Expected result (output when using mono or a dotnet console app):

Void .ctor()
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Runtime untriaged New issue has not been triaged by the area owner labels May 19, 2020
@marek-safar marek-safar added the runtime-mono specific to the Mono runtime label May 19, 2020
@alexischr
Copy link
Contributor

@rolfbjarne I am actually getting Void .ctor() (on stable, X.I version 13.18.2.1)

@rolfbjarne
Copy link
Member Author

@alexischr Sorry I wasn't clear in the description, but the problem occurs with .NET 5, not current stable XI.

@lambdageek lambdageek added this to the 6.0.0 milestone Jun 22, 2020
@lambdageek lambdageek removed the untriaged New issue has not been triaged by the area owner label Jun 22, 2020
@marek-safar marek-safar added the os-ios Apple iOS label Jun 24, 2020
@alexischr
Copy link
Contributor

I did something wrong the first time I checked this under a default desktop build and must have run CoreCLR on my sample - The behavior is actually reproducible on the desktop when using a Mono build. So this is a more general bug.

@alexischr alexischr removed the os-ios Apple iOS label Jun 25, 2020
@alexischr alexischr changed the title iOS: ConstructorInfo.ToString () returns unexpected format Mono: ConstructorInfo.ToString () returns unexpected format Jun 25, 2020
alexischr added a commit to alexischr/runtime that referenced this issue Jun 29, 2020
alexischr added a commit that referenced this issue Jul 15, 2020
* [mono] Improve RuntimeConstructorInfo.ToString

Use CoreCLR's code. Fixes #36688

* Use CoreCLR's code for RuntimeMethodInfo too
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime runtime-mono specific to the Mono runtime
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants