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

Use const instead of immutable for compatibility with new libdparse #805

Closed
wants to merge 1 commit into from

Conversation

Hackerpilot
Copy link
Collaborator

Looks like the libdparse token changes weren't as backwards-compatible as we hoped. See #799 (comment)

@WebFreak001
Copy link
Member

hm I'm not quite sure how these changes are related to the token structure changes. Did including the const arrays make it impossible to be immutable?

In this case would changing

    const(typeof(this))[] leadingTrivia;
    /// ditto
    const(typeof(this))[] trailingTrivia;

in libdparse to

    immutable(typeof(this))[] leadingTrivia;
    /// ditto
    immutable(typeof(this))[] trailingTrivia;

be the needed fix? The appender data is dup'd anyway, it could probably be changed to idup without issues.

WebFreak001 added a commit to WebFreak001/libdparse that referenced this pull request Apr 28, 2020
Fixes immutable assignment of tokens to variables (See dlang-community/D-Scanner#805)
Copy link
Member

@WebFreak001 WebFreak001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing it here isn't the right approach imo, I submitted a PR to libdparse to fix it there instead

@Hackerpilot Hackerpilot deleted the new-dparse-compat branch April 29, 2020 07:53
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.

2 participants