Skip to content

Commit

Permalink
fix breakage on LDC, add to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Nov 30, 2022
1 parent 421e592 commit 68bd117
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@ permissions:
jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
dc: [dmd-latest, ldc-latest, ldc-1.27.0]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: dlang-community/[email protected]
with:
compiler: ${{ matrix.dc }}

- name: 'Build & Test'
run: |
Expand Down
8 changes: 4 additions & 4 deletions src/toml/datetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct DateTime {
public Date date;
public TimeOfDay timeOfDay;

@safe scope:
@safe:

public pure inout @property DateTimeD dateTime() {
return DateTimeD(this.date, this.timeOfDay.timeOfDay);
Expand All @@ -38,7 +38,7 @@ struct DateTime {
return DateTime(dt.date, TimeOfDay(dt.timeOfDay, frac));
}

public pure inout string toISOExtString() {
public pure inout string toISOExtString() scope {
return this.date.toISOExtString() ~ "T" ~ this.timeOfDay.toString();
}

Expand All @@ -49,7 +49,7 @@ struct TimeOfDay {
public TimeOfDayD timeOfDay;
public Duration fracSecs;

@safe scope:
@safe:

alias timeOfDay this;

Expand All @@ -62,7 +62,7 @@ struct TimeOfDay {
return TimeOfDay(TimeOfDayD.fromISOExtString(str), frac);
}

public pure inout string toISOExtString() {
public pure inout string toISOExtString() scope {
immutable msecs = this.fracSecs.total!"msecs";
if (msecs != 0) {
return this.timeOfDay.toISOExtString() ~ "." ~ to!string(msecs);
Expand Down

0 comments on commit 68bd117

Please sign in to comment.