From 334032294ffd9549a772312cfe5e776c0b9aa934 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Wed, 19 Sep 2018 12:46:50 +0200 Subject: Fix linking issue in cpp codegen Declare the root symbol only once and have the other modules depending on it emit an `extern` declaration. Fixes #9013 --- tests/cpp/t9013.nim | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/cpp/t9013.nim (limited to 'tests') diff --git a/tests/cpp/t9013.nim b/tests/cpp/t9013.nim new file mode 100644 index 000000000..6103cf2e7 --- /dev/null +++ b/tests/cpp/t9013.nim @@ -0,0 +1,9 @@ +discard """ + targets: "cpp" + cmd: "nim $target --debugger:native $options $file" +""" + +# The --debugger switch is needed in order to enable the defined(nimTypeNames) +# code path in hti.nim +import typeinfo +var tt: Any -- cgit 1.4.1-2-gfad0