mirror of
https://github.com/nim-lang/Nim.git
synced 2026-09-17 18:44:53 +00:00
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
15
tests/cpp/t22712.nim
Normal file
15
tests/cpp/t22712.nim
Normal file
@@ -0,0 +1,15 @@
|
||||
discard """
|
||||
targets: "cpp"
|
||||
errormsg: "constructor in an imported type needs importcpp pragma"
|
||||
line: 14
|
||||
"""
|
||||
{.emit: """/*TYPESECTION*/
|
||||
struct CppStruct {
|
||||
CppStruct();
|
||||
};
|
||||
""".}
|
||||
|
||||
type CppStruct {.importcpp.} = object
|
||||
|
||||
proc makeCppStruct(): CppStruct {.constructor.} =
|
||||
discard
|
||||
Reference in New Issue
Block a user