≈ the.bay.news

Consumption of class & global stored properties

Swift Forums
Consumption of class & global stored properties
Hi everyone, I've been working on a new move-checker for the Swift compiler, with the goal of closing usability gaps with noncopyable types. One gap is that you can't consume a noncopyable stored property of a class, or a global variable, and then put a new value back later in the same function. I'd like to start a discussion on a solution that lifts the restriction. Problem Today, the compiler rejects this: struct NC: ~Copyable { /* ... */ } func transform(_ value: consuming NC) -> NC { /* ...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.