当前位置:网站首页>Dip1000 implicitly tagged with fields
Dip1000 implicitly tagged with fields
2022-07-02 08:35:00 【fqbqrr】
original text dip1000 Implicit go Closure Property failed .
struct A {
void method() pure @safe nothrow @nogc {
}
}
void test(scope void delegate() del) @safe {
}
void main() @safe {
A a;
// OK:
void delegate() del = &a.method;
test(&a.method);
}
use -preview=dip1000 Compile time failure , Will interrupt some Function implementation .
The following will work :
struct A {
int* p;
void method() scope pure @safe nothrow @nogc {
}
}
void test(scope void delegate() del) @safe {
}
void main() @safe {
A a;
test(&a.method);
}
Be careful
1, to Method Add Domain , Indicates that the method will not escape this.p.
2,int* p;, otherwise , Will ignore the addition Domain .
The possible fix is , If there are no fields indirect , Then implicitly give Method Add Domain Mark .
边栏推荐
- 实现双向链表(带傀儡节点)
- Routing foundation - dynamic routing
- Carla-UE4Editor导入RoadRunner地图文件(保姆级教程)
- Global and Chinese market of electric cheese grinder 2022-2028: Research Report on technology, participants, trends, market size and share
- 16: 00 interview, came out at 16:08, the question is really too
- Openfeign is easy to use
- OpenFeign 简单使用
- Constant pointer and pointer constant
- Chinese garbled code under vscade
- [untitled]
猜你喜欢

Sqli labs Level 2

CarSim learning experience - rough translation 1

Honeypot attack and defense drill landing application scheme

Carsim-问题Failed to start Solver: PATH_ID_OBJ(X) was set to Y; no corresponding value of XXXXX?

Gateway is easy to use

Sqlyog remote connection to MySQL database under centos7 system

KubeSphere 虚拟化 KSV 安装体验

St-link connection error invalid ROM table of STM32 difficult and miscellaneous diseases

文件上传-upload-labs

Use C language to receive JSON strings
随机推荐
STM32 new project (refer to punctual atom)
Use of OpenCV 6.4 median filter
Comparable,Comparator,Clonable 接口使用剖析
Sqlyog remote connection to MySQL database under centos7 system
Web security -- Logical ultra vires
ICMP协议
Matlab-其它
Sentinel easy to use
Generate database documents with one click, which can be called swagger in the database industry
Chrome debugging
What is SQL injection
Classes and objects (instantiation of classes and classes, this, static keyword, encapsulation)
In depth understanding of prototype drawings
Linked list classic interview questions (reverse the linked list, middle node, penultimate node, merge and split the linked list, and delete duplicate nodes)
HCIA - data link layer
Library function of C language
Vs code configuration problem
HCIA - application layer
C language replaces spaces in strings with%20
Sentinel 简单使用