From a5eb7db0b42f41ccea4b2da468d177f60f07d459 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 15 Sep 2023 09:18:02 +0200 Subject: [PATCH] Apply suggestions from code review --- doc/manual_experimental.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/manual_experimental.md b/doc/manual_experimental.md index 7f1948eb1aba..dd28fa67c156 100644 --- a/doc/manual_experimental.md +++ b/doc/manual_experimental.md @@ -2392,7 +2392,7 @@ For example: ```nim -{.emit:"""/*TYPESECTION*/ +{.emit: """/*TYPESECTION*/ struct CppStruct { CppStruct(int x, char* y): x(x), y(y){} int x; @@ -2402,10 +2402,10 @@ struct CppStruct { type CppStruct {.importcpp, inheritable.} = object -proc makeCppStruct(a:cint = 5, b:cstring = "hello"): CppStruct {.importcpp: "CppStruct(@)", constructor.} +proc makeCppStruct(a: cint = 5, b:cstring = "hello"): CppStruct {.importcpp: "CppStruct(@)", constructor.} -(proc (s:CppStruct) = echo "hello")(makeCppStruct()) -#if one remove a default value from the constructor and pass it to the call. The C++ compiler will complain. +(proc (s: CppStruct) = echo "hello")(makeCppStruct()) +# If one removes a default value from the constructor and passes it to the call explicitly, the C++ compiler will complain. ```