Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cd7bd4

Browse files
committed
when looking for a custom argument converter look at base types too
1 parent b6421e9 commit 6cd7bd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/methodbinder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ static PyArgConverterAttribute TryGetArgConverter(Type type) {
203203

204204
return ArgConverterCache.GetOrAdd(type, declaringType =>
205205
declaringType
206-
.GetCustomAttributes(typeof(PyArgConverterAttribute), inherit: false)
206+
.GetCustomAttributes(typeof(PyArgConverterAttribute), inherit: true)
207207
.OfType<PyArgConverterAttribute>()
208208
.SingleOrDefault()
209209
?? declaringType.Assembly
210-
.GetCustomAttributes(typeof(PyArgConverterAttribute), inherit: false)
210+
.GetCustomAttributes(typeof(PyArgConverterAttribute), inherit: true)
211211
.OfType<PyArgConverterAttribute>()
212212
.SingleOrDefault()
213213
);

0 commit comments

Comments
 (0)