Skip to content

Conversation

JackStouffer
Copy link
Contributor

#3348 introduced a regression by attributing several functions in std.json. This fixes that issue by inferring attributes by templating those functions.

I am unaware of how to make a unit test based on files, so any help there would be appreciated.

@JakobOvrum
Copy link
Contributor

Has anyone reduced the underlying bug? Going by the error message it sounds like the nested functions in parseJSON cause the issue. One of them has its address taken, although it doesn't use the json variable. Why does the template-ness (I don't think this has anything to do with attributes) of the member functions decide whether it manifests or not?

edit:

parseJSON.popChar and parseJSON.peekChar appear to be the only functions using the upvalue json.

@JackStouffer
Copy link
Contributor Author

Odd, I just came back to this and reset all of my changes to start doing some debugging and the bug was no longer there. To try to make sure I wasn't crazy, I did a digger build of five weeks ago and the bug wasn't there either. But it's in the 2.069.2 binary, which came out two weeks ago.

@JackStouffer
Copy link
Contributor Author

I'm going to close this as it seems that this was somehow fixed in master.

@PetarKirov
Copy link
Member

@JackStouffer it would be better, if you could include a test for this bug (even though it's working in master), to prevent it from appearing again as another regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants