From 1431f90d8c3d3ed0afcaee62073d5808cea227ff Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sat, 28 Jan 2023 04:41:59 +0800 Subject: Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the default definition would be ill-formed " (#21307) Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the default definition would be ill-formed (#21169)" This reverts commit a7bae919adb952362cb53206140872d2b7424b47. --- tests/cpp/t13093.nim | 24 ------------------------ tests/cpp/t17982.nim | 20 -------------------- 2 files changed, 44 deletions(-) delete mode 100644 tests/cpp/t13093.nim delete mode 100644 tests/cpp/t17982.nim (limited to 'tests/cpp') diff --git a/tests/cpp/t13093.nim b/tests/cpp/t13093.nim deleted file mode 100644 index 17c730d16..000000000 --- a/tests/cpp/t13093.nim +++ /dev/null @@ -1,24 +0,0 @@ -discard """ - targets: "cpp" - action: reject - errormsg: "The PledgeObj type requires the following fields to be initialized: refCount" -""" - -import atomics - -type - Pledge* = object - p: PledgePtr - - PledgePtr = ptr PledgeObj - PledgeObj = object - refCount: Atomic[int32] - -proc main() = - var pledge: Pledge - pledge.p = createShared(PledgeObj) - let tmp = PledgeObj() # <---- not allowed: atomics are not copyable - - pledge.p[] = tmp - -main() diff --git a/tests/cpp/t17982.nim b/tests/cpp/t17982.nim deleted file mode 100644 index 5413f06ff..000000000 --- a/tests/cpp/t17982.nim +++ /dev/null @@ -1,20 +0,0 @@ -discard """ - targets: "cpp" - action: "compile" -""" - -type - String* {.importcpp: "std::string", header: "string".} = object - -proc initString*(): String - {.importcpp: "std::string()", header: "string".} - -proc append*(this: var String, str: String): String - # bug seems to trigger when `#`, `@`, or `$1` is used inside `importcpp` - {.importcpp: "#.append(@)", header: "string", discardable.} # <- changed from `importcpp: "append"` - -var - s1 = initString() - s2 = initString() - -s1.append s2 -- cgit 1.4.1-2-gfad0