From fd1821736c950327e11740cc941e6c7876f20bae Mon Sep 17 00:00:00 2001 From: Artur Skawina Date: Sat, 7 Apr 2012 17:25:50 +0200 Subject: [PATCH] Regenerate, restoring full UpCast functionality. --- gtk2/glib2.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk2/glib2.d b/gtk2/glib2.d index c22d8dc..49ec475 100644 --- a/gtk2/glib2.d +++ b/gtk2/glib2.d @@ -25,11 +25,11 @@ alias int gboolean; auto UpCast(DT, ST)(ST src) { - static if (is(typeof(src):DT)) + static if (is(typeof(function DT(ST a) { return a; }))) return src; - else static if (is(typeof(UpCast!DT(&src.tupleof[0])):DT)) + else static if (is(typeof(function DT(ST a) { return UpCast!DT(&a.tupleof[0]); }))) return UpCast!DT(&src.tupleof[0]); - else static if (is(typeof(UpCast!DT(src.tupleof[0])):DT)) + else static if (is(typeof(function DT(ST a) { return UpCast!DT(a.tupleof[0]); }))) // If we're already doing some magic, we can just as well go // all the way, and make the inheritance work not only for "true" // struct inheritance (ie parent embedded as first field), but -- 2.11.4.GIT