当前位置:网站首页>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 .
边栏推荐
- Viewing JS array through V8
- Simple implementation scheme of transcoding and streaming (I)
- Summary of one question per day: linked list (continuously updated)
- Opencv3 6.3 reduced pixel sampling with filters
- Data asset management function
- Implementation of bidirectional linked list (simple difference, connection and implementation between bidirectional linked list and unidirectional linked list)
- ARP及ARP欺骗
- Classes and objects (instantiation of classes and classes, this, static keyword, encapsulation)
- 链表经典面试题(反转链表,中间节点,倒数第k个节点,合并分割链表,删除重复节点)
- 程序猿学英语-Learning C
猜你喜欢

Carsim-实时仿真的动画同步问题

Carsim-路面3D形状文件参数介绍

Opencv3 6.3 reduced pixel sampling with filters

sqli-labs第1关

Installation and use of simple packaging tools

2022 Heilongjiang latest construction eight members (materialman) simulated examination questions and answers

Chinese garbled code under vscade

Sqli labs Level 2

Openfeign facile à utiliser

Introduction to parameters of CarSim pavement 3D shape file
随机推荐
KubeSphere 虚拟化 KSV 安装体验
Matlab-其它
Deep understanding of JVM
Zipkin is easy to use
Smart agriculture solutions smart agriculture system development
How to build the alliance chain? How much is the development of the alliance chain
Longest isometric subsequence
Realization of basic function of sequence table
c语言自定义类型枚举,联合(枚举的巧妙使用,联合体大小的计算)
2022 Heilongjiang latest construction eight members (materialman) simulated examination questions and answers
sqli-labs第1关
Web安全--核心防御机制
Classes and objects (instantiation of classes and classes, this, static keyword, encapsulation)
Constant pointer and pointer constant
HCIA—應用層
Opencv common method source link (continuous update)
STM32 new project (refer to punctual atom)
Sqli labs Level 2
Honeypot attack and defense drill landing application scheme
install. IMG production method