Skip to content
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

Issue 9654 - Template function cannot take string by ref T[len] #1723

Merged
merged 1 commit into from
Mar 6, 2013

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Mar 6, 2013

@yebblies
Copy link
Member

yebblies commented Mar 6, 2013

Why are the tests in testbounds, not one of the template files?

@9rnsr
Copy link
Contributor Author

9rnsr commented Mar 6, 2013

Because, such conversion (from string to ref const char[dim]) is a specialized case of issue 3652 in IMO.

Note: Issue 3652 is the conversion from slice to ref static array type with compile-time known boundaries (e.g. T[lwr .. upr] -> ref T[upr - lwr] ), and that is supported from few days ago.

@yebblies
Copy link
Member

yebblies commented Mar 6, 2013

This issue doesn't involve bounds checking or slicing, it is about string literals and template argument deduction. I don't think the benefit of being next to the other testcase outweighs the downside of being in the wrong test file.

@9rnsr
Copy link
Contributor Author

9rnsr commented Mar 6, 2013

Ok, I moved test to test/runnable/template9.d.

yebblies added a commit that referenced this pull request Mar 6, 2013
Issue 9654 - Template function cannot take string by ref T[len]
@yebblies yebblies merged commit fb5f3fb into dlang:master Mar 6, 2013
@yebblies
Copy link
Member

yebblies commented Mar 6, 2013

Thanks, merged.

As a side note, inserting the test cases randomly into the test files is much less likely to create merge conflicts than appending at the bottom.

@9rnsr 9rnsr deleted the fix9654 branch March 6, 2013 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants