EpicSkookumScript / EpicSkookumScript/SkookumScript-Plugin

Check for re-entry in constructors

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
138
Forks
22
PR merge metrics
No merged PRs in 30d

Description

**Issue by [error454](https://github.com/error454)**
_Friday Jul 05, 2019 at 22:39 GMT_
_Originally opened as https://github.com/SkookumScript/SkookumScript-Plugin/issues/9_

----

**Is your feature request related to a problem? Please describe.**
I wrote a variable initializer in `BaseArconiaPawn`s constructor as:
`@arconian_owner : BaseArconiaPawn!`

I fully intended on that being:
`@arconian_owner : BaseArconiaPawn!null`

When I next hit play I got a stack overflow.

**Describe the solution you'd like**
Throw an assert with a relevant warning if this situation arises. Or better yet make it a compiler error.

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by tracing how the BaseArconiaPawn constructor initializer is handled and how the non-null `BaseArconiaPawn!` form differs from `BaseArconiaPawn!null`. Done means recursive constructor entry is detected with a relevant warning or compiler error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.