Files
Nim/tests/ic/tgenericinst.nim
Juan M Gómez e6ca13ec85 Instantiates generics in the module that uses it (#22513)
Attempts to move the generic instantiation to the module that uses it.
This should decrease re-compilation times as the source module where the
generic lives doesnt need to be recompiled

---------

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-09-09 10:34:20 +02:00

11 lines
253 B
Nim

discard """
cmd: "nim cpp --incremental:on $file"
"""
{.emit:"""/*TYPESECTION*/
#include <iostream>
struct Foo { };
""".}
type Foo {.importcpp.} = object
echo $Foo() #Notice the generic is instantiate in the this module if not, it wouldnt find Foo