d的dip1000中域

下面应在dip1000下编译失败.

ref int test(ref scope return int* p)
  {
     return *p;
  }

p应为return refscope,但编译器按ref/return scope解释并通过.
问题是,返回了p的值,而return ref/scope应阻止返回值.

posted @ 2022-02-19 10:38  zjh6  阅读(14)  评论(0)    收藏  举报  来源