Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

fix Issue 11344 - Error: object.destroy called with argument types matches both #647

Merged
1 commit merged into from
Oct 28, 2013

Conversation

WalterBright
Copy link
Member

@Dgame
Copy link

Dgame commented Oct 28, 2013

LGTM

@ghost
Copy link

ghost commented Oct 28, 2013

How come those functions don't properly overload? I would have thought the (T : U[n], U, size_t n) expression would be a de-facto template constraint. I guess this could be a future enhancement though.

ghost pushed a commit that referenced this pull request Oct 28, 2013
fix Issue 11344 - Error: object.destroy called with argument types matches both
@ghost ghost merged commit 330e19d into dlang:master Oct 28, 2013
@mihails-strasuns-sociomantic
Copy link
Contributor

I would have thought the (T : U[n], U, size_t n) expression would be a de-facto template constraint.

It kind of is but : means "implicitly convertible to" and thus matches because of aliased array member. Enhancement request for re-defining destroy overload signatures with more strict constraints does make sense though (this pull is closer to workaround)

@ghost
Copy link

ghost commented Oct 28, 2013

Ah right the alias this is to blame. Nevermind then.

@WalterBright WalterBright deleted the fix11344 branch October 29, 2013 01:32
ghost pushed a commit that referenced this pull request Oct 29, 2013
fix Issue 11344 - Error: object.destroy called with argument types matches both
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants