Skip to content

Commit 5f79843

Browse files
committed
Fix compiler error from new C# inference causing ambiguity
1 parent 1c6839e commit 5f79843

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/TableStorage/TableStorageAttribute.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ abstract partial class TableStorageAttribute : Attribute
2121
});
2222

2323
protected static Expression<Func<TEntity, string>> CreateGetter<TEntity, TAttribute>() where TAttribute : Attribute
24-
=> (Expression<Func<TEntity, string>>)getters.GetOrAdd((typeof(TEntity), typeof(TAttribute)), _ => CreateGetterCore<TEntity, TAttribute>());
24+
=> (Expression<Func<TEntity, string>>)getters.GetOrAdd((typeof(TEntity), typeof(TAttribute)),
25+
(Func<(Type, Type), Expression<Func<TEntity, string>>>)(_ => CreateGetterCore<TEntity, TAttribute>()));
2526

2627
protected static Func<TEntity, string> CreateCompiledGetter<TEntity, TAttribute>() where TAttribute : Attribute
2728
=> (Func<TEntity, string>)compiledGetters.GetOrAdd((typeof(TEntity), typeof(TAttribute)), _ => CreateGetter<TEntity, TAttribute>().Compile());

0 commit comments

Comments
 (0)