Nim icon indicating copy to clipboard operation
Nim copied to clipboard

Missing compiler error for array in type definition

Open synaptseal opened this issue 4 years ago • 1 comments

Array definition ArrayName: array without its generic types defined in a type definition returns a generic compiler error, rather than a specified error message – which is the standard for other errors and useful output for the developer.

Example

Type definition: type ExampleObj = object ArrayName : array

Current Output

Error: internal error: invalid kind for lastOrd(tyGenericParam)

Expected Output (something like)

example.nim (3, x) Missing definitions for generic types of `type array*[int (array length), type]`

Possible Solution

Add this compiler error.

Compiler Info

$ nim -v
Nim Compiler Version 1.7.1 [MacOSX: amd64]
Compiled at 2022-02-14
Copyright (c) 2006-2022 by Andreas Rumpf

git hash: b2c5d7b4ff070abe2145e998d090fb15b4df522f
active boot switches: -d:release -d:nimUseLinenoise

Thanks! 😄

synaptseal avatar Feb 20 '22 04:02 synaptseal

object ArrayName : array is totally invalid.

bung87 avatar Sep 20 '22 11:09 bung87