nim-works / nimskull

An in development statically typed systems programming language; with sustainability at its core. We, the community of users, maintain it.

Home Page:https://nim-works.github.io/nimskull/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compiler fatal error on lack of type arguments

theSherwood opened this issue · comments

Specification

Instead of returning information to the user about needing to specify type arguments for Wrapper (as in Wrapper[int, int]). Instead the compiler hits a fatal error.

Example

type
  Wrapper*[K, V] = object
    node*: (K, V)

echo sizeof(Wrapper)

Actual Output

Fatal: Internal unreachable code executed - ccgtypes.nim(708, 18) (getTypeDescAux(tyGenericParam)) should never be called.

Expected Output

I would expect the compiler to fail to compile the code and print a message to the user about the lack of type arguments.

Possible Solution

Additional Information

References

As per our discussion on Matrix, I've assigned you to this issue, in order to make it easier to keep of who is working on what.

Fixed by #1328.