Skip to content

Allow implicit cast from *T to *const ?*T #836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AndreaOrru opened this issue Mar 16, 2018 · 1 comment
Closed

Allow implicit cast from *T to *const ?*T #836

AndreaOrru opened this issue Mar 16, 2018 · 1 comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone

Comments

@AndreaOrru
Copy link
Contributor

AndreaOrru commented Mar 16, 2018

var threads = ArrayList(?*Thread).init(&mem.allocator);

const thread = mem.allocator.create(Thread) catch unreachable;
thread.* = Thread { ... };

threads.append(thread);
error: expected type '*const ?*Thread', found '*Thread'

Related: #796

@andrewrk andrewrk added this to the 0.3.0 milestone Mar 21, 2018
@andrewrk andrewrk added the proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. label Aug 25, 2018
@andrewrk andrewrk modified the milestones: 0.3.0, 0.4.0 Aug 25, 2018
@andrewrk andrewrk changed the title Allow implicit cast from &T to &const ?&T Allow implicit cast from *T to *const ?*T Nov 19, 2018
@andrewrk
Copy link
Member

andrewrk commented Nov 19, 2018

Now that #733 landed, I don't think we need this.

See also: #1465

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

No branches or pull requests

2 participants