From 7d47caa87d0a0b6050f358b1391b8e0cf7168094 Mon Sep 17 00:00:00 2001 From: Geod24 Date: Mon, 13 Jan 2020 16:33:25 +0900 Subject: [PATCH] Enable dip1000, drop support for < 2.085.1, test on OSX --- .travis.yml | 42 ++++++++++++++++-------- dub.sdl | 5 +++ source/taggedalgebraic/taggedalgebraic.d | 2 +- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 036ac20..6771c61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,35 @@ language: d +os: + - linux + - osx + +# Order: oldest DMD, newest LDC, oldest LDC +# Latest DMD is in the matrix.include to give it the `COVERAGE` env variable +d: + - dmd-2.085.1 + - ldc-1.19.0 + - ldc-1.15.0 + - dmd-nightly + - ldc-latest-ci + matrix: include: - - d: dmd-beta - - d: dmd-2.088.0 - env: [COVERAGE=true] + # Last FE GDC is compatible with - d: dmd-2.076.1 - - d: ldc-1.17.0 - - d: ldc-1.16.0 - - d: ldc-1.15.0 - - d: ldc-1.14.0 - - d: ldc-1.6.0 - - d: dmd-2.087.1 - - d: dmd-2.086.1 - - d: dmd-2.085.1 - - d: dmd-2.084.1 - -sudo: false + os: linux + script: dub build + - d: dmd-2.076.1 + os: osx + script: dub build + - d: dmd-2.090.0 + os: linux + env: [COVERAGE=true] + - d: dmd-2.090.0 + os: osx + env: [COVERAGE=true] + allow_failures: + - d: dmd-nightly + - d: ldc-latest-ci script: ./travis.sh diff --git a/dub.sdl b/dub.sdl index 7f044a1..6c0c960 100644 --- a/dub.sdl +++ b/dub.sdl @@ -3,3 +3,8 @@ description `A "tagged union" implementation with transparent operator forwardin authors "Sönke Ludwig" copyright "Copyright © 2015, Sönke Ludiwg" license "BSL-1.0" + +buildType "unittest" { + buildOptions "unittests" "debugMode" "debugInfo" + dflags "-preview=dip1000" +} diff --git a/source/taggedalgebraic/taggedalgebraic.d b/source/taggedalgebraic/taggedalgebraic.d index 5fc21d4..cb9eb43 100644 --- a/source/taggedalgebraic/taggedalgebraic.d +++ b/source/taggedalgebraic/taggedalgebraic.d @@ -943,7 +943,7 @@ unittest { // "in" operator unittest { // issue #15 - by-ref return values static struct S { int x; - ref int getx() { return x; } + ref int getx() return { return x; } } static union U { S s; } alias TA = TaggedAlgebraic!U;