当前位置:网站首页>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 .
边栏推荐
- The best blog to explain the basics of compilation (share)
- install. IMG production method
- 旋转链表(图解说明)
- ICMP协议
- Deep understanding of JVM
- IP协议与IP地址
- Using C language to realize MySQL true paging
- Use C language to receive JSON strings
- web安全--逻辑越权
- Summary of one question per day: String article (continuously updated)
猜你喜欢

C language custom types - structure, bit segment (anonymous structure, self reference of structure, memory alignment of structure)

Routing foundation - dynamic routing

Openfeign is easy to use

STM32-新建工程(参考正点原子)

ARP and ARP Spoofing

Sqli labs level 12

Rotating linked list (illustration)

链表经典面试题(反转链表,中间节点,倒数第k个节点,合并分割链表,删除重复节点)

Use Wireshark to grab TCP three handshakes

sqli-labs第8关(布尔盲注)
随机推荐
C language custom type enumeration, Union (clever use of enumeration, calculation of union size)
程序猿学英语-Learning C
Chinese garbled code under vscade
SQL operation database syntax
Detailed explanation of NIN network
Web安全--核心防御机制
Animation synchronization of CarSim real-time simulation
How to build the alliance chain? How much is the development of the alliance chain
Introduction to anti interception technology of wechat domain name
sqli-labs(POST类型注入)
ARP and ARP Spoofing
OpenCV3 6.2 低通滤波器的使用
实现双向链表(带傀儡节点)
HCIA—應用層
cve_ 2019_ 0708_ bluekeep_ Rce vulnerability recurrence
Method recursion (Fibonacci sequence, frog jumping steps, tower of Hanoi problem)
What is SQL injection
zipkin 简单使用
C language custom types - structure, bit segment (anonymous structure, self reference of structure, memory alignment of structure)
Summary of one question per day: stack and queue (continuously updated)