提交 7fa30831 编写于 作者: J Julien Couvreur

Adjust RestrictedTypesAllowedInStackalloc (unamanged generic type allowed)

上级 55b53830
......@@ -58,9 +58,6 @@ unsafe void M()
// (10,29): error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('RefG<string>')
// var x2 = stackalloc RefG<string>[10];
Diagnostic(ErrorCode.ERR_ManagedAddr, "RefG<string>").WithArguments("RefG<string>").WithLocation(10, 29),
// (11,29): error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('RefG<int>')
// var x3 = stackalloc RefG<int>[10];
Diagnostic(ErrorCode.ERR_ManagedAddr, "RefG<int>").WithArguments("RefG<int>").WithLocation(11, 29),
// (16,22): error CS0611: Array elements cannot be of type 'RefS'
// var y1 = new RefS[10];
Diagnostic(ErrorCode.ERR_ArrayElementCantBeRefAny, "RefS").WithArguments("RefS").WithLocation(16, 22),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册