-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
internal error: no generic body #1500
Comments
Workaround is to change the order of the type declarations. |
Another example type
TFtpClient* = TFtpBase[int]
PFtpClient* = ref TFTPClient
PFtpBase*[SockType] = ref TFtpBase[SockType]
TFtpBase*[SockType] = object
job: PFTPJob[SockType]
PFtpJob[T] = ref TFtpJob[T]
TFTPJob[T] = object
proc ftpClient*(): PFTPClient =
discard Edit from Krux02: This compiles in current version of Nim. |
Still crashes with #head
|
I updated the issue to conform the current issue template. This is not a crash, because the compiler doesn't crash. It just reports an error even though it should compile. Since the Workaround is trivial, I will set this as low priority for now. |
@krux02 Every "internal error" does count as a crash. |
9 years later and still not fixed... |
!nim c {.experimental: "codeReordering".}
type
TFtpBase*[SockType] = object
job: TFTPJob[SockType]
PFtpBase*[SockType] = ref TFtpBase[SockType]
TFtpClient* = TFtpBase[string]
TFTPJob[T] = object |
@bung87 (collaborator) devel 👍 |
is there's any side effect not to enable |
|
The code block should work without |
Example
Current Output
Expected Output
This should compile
Workaround
change the order of declarations
Additional Information
The text was updated successfully, but these errors were encountered: