Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
type
ConnectionRequest* = ref object of RootObj
ConnectionStrBool* = distinct bool
ConnectionSetRequest = ref object of ConnectionRequestT[ConnectionStrBool]
ConnectionRequestT*[T] = ref object of ConnectionRequest
proc execute*(req: ConnectionRequestT[bool]) = discard
proc execute*(req: ConnectionRequestT[ConnectionStrBool]) = discard
ConnectionSetRequest().execute()
Apparently used to give this error:
/tmp/zzz.nim(4, 37) Error: inheritance only works with non-final objects; for ConnectionRequestT[zzz.ConnectionStrBool] to be inheritable it must be 'object of RootObj' instead of 'object', but swapping object declaration order into
But now segfaults the compiler in lookupInRecordAndBuildCheck called here.
This case also used to not compile:
type
Foo = object of Bar
Bar = object of RootObj
and now compiles, but might not work if Foo is used further.
Split from #18861
Apparently used to give this error:
But now segfaults the compiler in
lookupInRecordAndBuildCheck
called here.This case also used to not compile:
and now compiles, but might not work if
Foo
is used further.5687 might be related