-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateTime field on Exception produces inconsistent C/++ handling #11081
Labels
Comments
Problem remains as of
|
Problem remains as of
|
Issue is related to inheritance. type Foo* = object of RootObj
type
MyError = object of Exception
xyz: Foo
try:
var foo = newException(MyError, "")
raise foo
except MyError:
echo "error"
except Exception:
echo "exception"
except:
echo "default" gives the same result. |
Will be fixed by #13065 |
Another bug squashed! Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Admittedly, I'm a novice and may be missing something, but I'm finding this hard to reason about...
When compiled with
nim c
, it yieldserror
.When compiled with
nim cpp
, it segfaults.When compiled with
nim cpp --noCppExceptions
, it yieldsdefault
.Assigning the value to
clock
has no impact, but changeclock
from aDateTime
to, say, astring
, and all is well in the world -- all three compilations yielderror
when run.This is devel on Linux.
The text was updated successfully, but these errors were encountered: