Skip to content

Fix std.regex.internal.shiftor#5243

Closed
kinke wants to merge 1 commit intodlang:stablefrom
kinke:stable
Closed

Fix std.regex.internal.shiftor#5243
kinke wants to merge 1 commit intodlang:stablefrom
kinke:stable

Conversation

@kinke
Copy link
Contributor

@kinke kinke commented Mar 5, 2017

I don't know why this seems to work for DMD. LDC failed to compile the unittests for this module.

Firstly, alias std.regex.internal.kickstart.Kickstart = std.regex.internal.kickstart.ShiftOr wasn't found. That seems okay, as std.regex.internal.kickstart is only imported locally in a struct in imported std.regex.internal.ir.

When working around that, LDC complained that class std.regex.internal.shiftor.ShiftOr can't derive from struct std.regex.internal.kickstart.ShiftOr.

When fixing that by not deriving from anything (there was a std.regex.internal.ir.Kickstart interface before 5a2491a), further compile errors arised as one can't foreach over a CodepointSet directly. I patched the problematic sites via copying code from the almost identical struct Kickstart in module kickstart, so that it now really works.

I don't know why this seems to work for DMD. LDC failed to compile the
unittests for this module.

Firstly, `alias std.regex.internal.kickstart.Kickstart =
std.regex.internal.kickstart.ShiftOr` wasn't found. That seems okay, as
std.regex.internal.kickstart is only imported locally in a struct in
imported std.regex.internal.ir.

When working around that, LDC complained that class
std.regex.internal.**shiftor**.ShiftOr can't derive from **struct**
std.regex.internal.**kickstart**.ShiftOr.

When fixing that by not deriving from anything (there was a
std.regex.internal.ir.Kickstart interface before dlang/phobos@5a2491a),
further compile errors arised as one can't foreach over a CodepointSet
directly. I patched the problematic sites via copying code from the almost
identical struct Kickstart in module kickstart, so that it now really
works.
@kinke kinke changed the base branch from master to stable March 5, 2017 16:15
@kinke kinke closed this Mar 5, 2017
@kinke kinke reopened this Mar 5, 2017
@kinke
Copy link
Contributor Author

kinke commented Mar 5, 2017

Hmm, no way to retrigger CI after fixing the base branch?

@kinke
Copy link
Contributor Author

kinke commented Mar 5, 2017

Opening a new PR then.

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.

1 participant