C#12 collection expressions are not supported
Serg046 opened this issue · comments
Sergey Aseev commented
C# 12 brings a new way to instantiate collections via brackets like this [1,2,3]
. Currently this is not supported so that Bind<IDependency>(tags: "tag").To<Dependency>()
works fine but Bind<IDependency>(tags: ["tag"]).To<Dependency>()
fails with "DIE001 ["tag"] must be a constant value of type System.Object.". Btw, C# treats it as a constant, you can use such a value in attributes, etc.
Nikolay Pianikov commented
In order to accomplish this task, we need to support Roslyn 4.8