We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
void main() { uint[1][2] arr1 = [[0, 0]]; int[2] arr2 = [1.5, 2.5]; } DMD 2.067alpha gives a strange error messages: test.d(2,23): Error: cannot implicitly convert expression ([[0, 0]]) of type int[][] to uint[] test.d(3,19): Error: cannot implicitly convert expression ([1.5, 2.5]) of type double[] to int[] But I suggest to give more clear error message, something like: test.d(2,23): Error: array sizes mismatch, cannot implicitly convert array literal of shape (2, 1) to shape (1, 2) test.d(3,19): Error: cannot implicitly convert expression ([1.5, 2.5]) of type double[] to int[2]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
bearophile_hugs reported this on 2014-10-25T14:38:40Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=13653
Description
void main() { uint[1][2] arr1 = [[0, 0]]; int[2] arr2 = [1.5, 2.5]; } DMD 2.067alpha gives a strange error messages: test.d(2,23): Error: cannot implicitly convert expression ([[0, 0]]) of type int[][] to uint[] test.d(3,19): Error: cannot implicitly convert expression ([1.5, 2.5]) of type double[] to int[] But I suggest to give more clear error message, something like: test.d(2,23): Error: array sizes mismatch, cannot implicitly convert array literal of shape (2, 1) to shape (1, 2) test.d(3,19): Error: cannot implicitly convert expression ([1.5, 2.5]) of type double[] to int[2]The text was updated successfully, but these errors were encountered: