Skip to content

Fix field type collection when meeting T[] or Generic<T> fields#422

Open
UlyssesWu wants to merge 1 commit intoTencent:masterfrom
UlyssesWu:fix_abstract_generic_base
Open

Fix field type collection when meeting T[] or Generic<T> fields#422
UlyssesWu wants to merge 1 commit intoTencent:masterfrom
UlyssesWu:fix_abstract_generic_base

Conversation

@UlyssesWu
Copy link

@UlyssesWu UlyssesWu commented Nov 6, 2024

The commit 9d8e950 is an uncomplete fix due to lack consideration of array and generic instance type fields in a generic base class. This commit will get it fixed.

Can be examined with this code:

abstract class Generic<T>
{
  T[] Field1;
  List<T> Field2;
}

class GenericString : Generic<string>
{
  [IFix.Patch]
  public void Test()
  {
    Field1 = new string[] {"Test"};
    Field2 = new List<string> {"Test"};
    Debug.Log(Field1[0]);
    Debug.Log(Field2[0]);
  }
}

@tencent-adm
Copy link
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@UlyssesWu
Copy link
Author

CLA assistant check Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

Of course I REFUSE to sign. 😤
That's to say, I do NOT grant Copyright or Patent license to Tencent, regardless of whether this PR got merged, or the maintainers committed code referenced to my code.

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

Successfully merging this pull request may close these issues.

2 participants

Comments