Skip to content
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

CFE: crash on recursive const constructor #36216

Open
MichaelRFairhurst opened this Issue Mar 14, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@MichaelRFairhurst
Copy link
Contributor

MichaelRFairhurst commented Mar 14, 2019

class C {
  Object inner;
  const C() : inner = const C();

This simply crashes.

According to @lrhn it is not allowed because const expressions cannot depend on themselves. So this crash is not preventing a valid pattern but its also not very user friendly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.