Skip to content

internal error: no generic body #1500

@dom96

Description

@dom96

Example

type
  TFtpBase*[SockType] = object
    job: TFTPJob[SockType]

  PFtpBase*[SockType] = ref TFtpBase[SockType]
  TFtpClient* = TFtpBase[string]
  TFTPJob[T] = object

Current Output

Error: internal error: no generic body

Expected Output

This should compile

Workaround

change the order of declarations

type
  TFTPJob[T] = object
  TFtpBase*[SockType] = object
    job: TFTPJob[SockType]

  PFtpBase*[SockType] = ref TFtpBase[SockType]
  TFtpClient = TFtpBase[string]

Additional Information

$ nim -v
Nim Compiler Version 0.19.9 [Linux: amd64]
Compiled at 2019-04-26
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: e48f420ab0161d6fc46c72a5a4f0142e77ed9796
active boot switches: -d:release

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions