File: phobos-2.091.patch

package info (click to toggle)
lix 0.9.29-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 44,852 kB
  • sloc: javascript: 166; sh: 13; makefile: 8
file content (39 lines) | stat: -rw-r--r-- 1,394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Patch taken from https://github.com/Abscissa/SDLang-D/pull/70/commits/90e5bdad1d803a507b34d46c5ecf82cb1feb7cd4
with paths adjusted to apply to the Debian lix package.

commit 90e5bdad1d803a507b34d46c5ecf82cb1feb7cd4
Author: Steven Schveighoffer <schveiguy@yahoo.com>
Date:   Fri Mar 20 17:26:58 2020 -0400

    Remove FracSec usage if not available in Phobos (2.091+) Fixes #68.

diff --git a/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d b/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d
index 593746c..074c705 100644
--- a/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d
+++ b/sdlang-d-0.10.4/sdlang-d/src/sdlang/token.d
@@ -24,9 +24,11 @@ struct DateTimeFrac
 {
 	DateTime dateTime;
 	Duration fracSecs;
-	deprecated("Use fracSecs instead.") {
+	static if(is(FracSec)) {
+	    deprecated("Use fracSecs instead.") {
 		@property FracSec fracSec() const { return FracSec.from!"hnsecs"(fracSecs.total!"hnsecs"); }
 		@property void fracSec(FracSec v) { fracSecs = v.hnsecs.hnsecs; }
+	    }
 	}
 }
 
@@ -44,9 +46,11 @@ struct DateTimeFracUnknownZone
 {
 	DateTime dateTime;
 	Duration fracSecs;
-	deprecated("Use fracSecs instead.") {
+	static if(is(FracSec)) {
+	    deprecated("Use fracSecs instead.") {
 		@property FracSec fracSec() const { return FracSec.from!"hnsecs"(fracSecs.total!"hnsecs"); }
 		@property void fracSec(FracSec v) { fracSecs = v.hnsecs.hnsecs; }
+	    }
 	}
 	string timeZone;