mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
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>
11 lines
253 B
Nim
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 |