From 56fe765a06de15025e514becd8f1d24000e3f429 Mon Sep 17 00:00:00 2001 From: cooldome Date: Sun, 14 Mar 2021 22:01:12 +0000 Subject: [PATCH] fix #17351 --- compiler/extccomp.nim | 4 ++-- tests/arc/texceptions.nim | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index e95ed893b67f..e531f8eb19db 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -86,7 +86,7 @@ compiler gcc: asmStmtFrmt: "asm($1);$n", structStmtFmt: "$1 $3 $2 ", # struct|union [packed] $name produceAsm: gnuAsmListing, - cppXsupport: "-std=gnu++14 -funsigned-char", + cppXsupport: "-std=gnu++17 -funsigned-char", props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasGnuAsm, hasAttribute}) @@ -113,7 +113,7 @@ compiler nintendoSwitchGCC: asmStmtFrmt: "asm($1);$n", structStmtFmt: "$1 $3 $2 ", # struct|union [packed] $name produceAsm: gnuAsmListing, - cppXsupport: "-std=gnu++14 -funsigned-char", + cppXsupport: "-std=gnu++17 -funsigned-char", props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasGnuAsm, hasAttribute}) diff --git a/tests/arc/texceptions.nim b/tests/arc/texceptions.nim index c55b463fc9f4..ec4172a25d3d 100644 --- a/tests/arc/texceptions.nim +++ b/tests/arc/texceptions.nim @@ -14,3 +14,13 @@ block: # issue #13071 a = e.msg & $e.name # was segfaulting here for `nim cpp --gc:arc` doAssert a == "foo:MyExcept" fun() + + +block: # issue #17351 + type + Foo {.inheritable.} = object + Foo2 = object of Foo + Bar = object + x: Foo2 + + var b = Bar() \ No newline at end of file