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

Methods should return the exact type #144

Open
ds5678 opened this issue Sep 1, 2024 · 0 comments
Open

Methods should return the exact type #144

ds5678 opened this issue Sep 1, 2024 · 0 comments
Labels
generation Related to assembly generation
Milestone

Comments

@ds5678
Copy link
Collaborator

ds5678 commented Sep 1, 2024

When a method returns an object (either as an actual return or as an out parameter), the type of that object should be the exact type, which might be derived from specified return type.

For example, consider this Mono method:

public static Stream GetStream() => new MemoryStream();

When when the Il2Cpp wrapper is called by a modder, we want it to return Il2CppSystem.IO.MemoryStream, not Il2CppSystem.IO.Stream.

This requires #142 and #143.

@ds5678 ds5678 added this to the 2.0.0 milestone Sep 1, 2024
@ds5678 ds5678 added the generation Related to assembly generation label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generation Related to assembly generation
Projects
None yet
Development

No branches or pull requests

1 participant