d的ref-return-scope
原文
ref-return-scope易混淆.
现在规则改为:
除非return scope按源码出现的顺序(中域),否则ref-return-scope总是按ref-return scope理解.
可处理各种情况,为后向兼容,放在-preview=dip1000里面.
比如:
ref int foo(ref return scope int* p)
就是ref与return-scope.即有中域则按中域.其余:
ref int foo(ref scope return int* p)
则是ref-return与scope(中引用与域).
浙公网安备 33010602011771号