Skip to content

Commit 8ca84c9

Browse files
committed
CorDebug: Instantiations for properties (including indexers)
(cherry picked from commit 7f13864)
1 parent 2c8a1de commit 8ca84c9

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CorApi2/Metadata/MetadataPropertyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public override MethodInfo GetGetMethod (bool nonPublic)
118118
return null;
119119

120120
if (m_getter == null)
121-
m_getter = new MetadataMethodInfo (m_importer, m_pmdGetter, Instantiation.Empty);
121+
m_getter = new MetadataMethodInfo (m_importer, m_pmdGetter, Instantiation.Create (m_declaringType.GenericTypeArguments));
122122

123123
if (nonPublic || m_getter.IsPublic)
124124
return m_getter;
@@ -139,7 +139,7 @@ public override MethodInfo GetSetMethod (bool nonPublic)
139139
return null;
140140

141141
if (m_setter == null)
142-
m_setter = new MetadataMethodInfo (m_importer, m_pmdSetter, Instantiation.Empty);
142+
m_setter = new MetadataMethodInfo (m_importer, m_pmdSetter, Instantiation.Create (m_declaringType.GenericTypeArguments));
143143

144144
if (nonPublic || m_setter.IsPublic)
145145
return m_setter;

CorApi2/Metadata/MetadataType.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,15 @@ out ptkExtends
113113
}
114114
}
115115

116-
// [Xamarin] Expression evaluator.
116+
public override bool IsGenericType
117+
{
118+
get
119+
{
120+
return m_typeArgs != null && m_typeArgs.Count > 0;
121+
}
122+
}
123+
124+
// [Xamarin] Expression evaluator.
117125
public override Type DeclaringType
118126
{
119127
get

0 commit comments

Comments
 (0)