Version Used:
Master branch from 27.10.2017
Steps to Reproduce:
c#
[A(1)]
class A : System.Attribute {
A(in int x) { }
}
Actual Behavior:
It compiles :) Cecil crashes when trying to read metadata produced.
Expected Behavior:
Compiler error over 1 argument range.
p.s. Error message in the case of passing attribute arguments to ref/out parameters suggest to use ref/out modifiers that are not parseable in the context of attribute arguments.
cc @VSadov
Yes, should be an error. Good catch!
@VSadov I feel this is cornercase enough that it wouldn't meet the bar for 15.5.
15.6 ok?
@jcouv - 15.6
It would not meet the bar for 15.5 at this point. There are obvious workarounds - "do not do this".
It is still a bug. Spec should disallow this scenario.