Skip to content

Commit 8e72268

Browse files
authored
Merge pull request #938 from Unity-Technologies/aot-friendly-getvalue
Make ProperInfo.GetValue AOT-friendly
2 parents 4bec875 + 0854d9b commit 8e72268

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mcs/class/corlib/System.Reflection/MonoProperty.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,9 @@ public override object GetValue (object obj, object[] index)
378378
{
379379
if (index == null || index.Length == 0) {
380380
/*FIXME we should check if the number of arguments matches the expected one, otherwise the error message will be pretty criptic.*/
381-
#if !FULL_AOT_RUNTIME
381+
// Once we ship the changes to make il2cpp always use the unityaot profile, we should change
382+
// this define to be UNITY_AOT. for now though, we'll take the AOT-friendly code path in all profiles.
383+
#if !FULL_AOT_RUNTIME && !UNITY
382384
if (cached_getter == null) {
383385
MethodInfo method = GetGetMethod (true);
384386
if (!DeclaringType.IsValueType && !method.ContainsGenericParameters) { //FIXME find a way to build an invoke delegate for value types.

0 commit comments

Comments
 (0)