Ticket #125 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

[Patch] append override

Reported by: bioinfornatics Assigned to: Mike Wey
Priority: major Milestone:
Component: Addon - gda Version: TRUNK
Keywords: Cc:

Description

Hi i have build gtkd with -w for append override keyworkds where is missed

diff -up gtkd-20120204svn928/src/gio/SocketConnectableT.d.fix gtkd-20120204svn928/src/gio/SocketConnectableT.d
--- gtkd-20120204svn928/src/gio/SocketConnectableT.d.fix	2012-02-04 17:22:07.660231038 +0100
+++ gtkd-20120204svn928/src/gio/SocketConnectableT.d	2012-02-04 17:22:59.740826819 +0100
@@ -81,7 +81,7 @@ public template SocketConnectableT(TStru
 	protected GSocketConnectable* gSocketConnectable;
 	
 	
-	public GSocketConnectable* getSocketConnectableTStruct()
+	public override GSocketConnectable* getSocketConnectableTStruct()
 	{
 		return cast(GSocketConnectable*)getStruct();
 	}
@@ -95,7 +95,7 @@ public template SocketConnectableT(TStru
 	 * Since 2.22
 	 * Returns: a new GSocketAddressEnumerator.
 	 */
-	public SocketAddressEnumerator enumerate()
+	public override SocketAddressEnumerator enumerate()
 	{
 		// GSocketAddressEnumerator * g_socket_connectable_enumerate  (GSocketConnectable *connectable);
 		auto p = g_socket_connectable_enumerate(getSocketConnectableTStruct());
@@ -116,7 +116,7 @@ public template SocketConnectableT(TStru
 	 * Since 2.26
 	 * Returns: a new GSocketAddressEnumerator.
 	 */
-	public SocketAddressEnumerator proxyEnumerate()
+	public override SocketAddressEnumerator proxyEnumerate()
 	{
 		// GSocketAddressEnumerator * g_socket_connectable_proxy_enumerate  (GSocketConnectable *connectable);
 		auto p = g_socket_connectable_proxy_enumerate(getSocketConnectableTStruct());

Change History

02/04/12 11:42:24 changed by Mike Wey

  • owner changed from JJR to Mike Wey.
  • status changed from new to assigned.

Adding override to getSocketConnectableTStruct() seems wrong as SocketConnectableT is the only class/Template that defines it. So it only makes sense when a class mixes in the Template while a base class also mixes it in. And in that case i'll need to find out which classes and remove the unneeded mixin.

02/04/12 12:02:09 changed by Mike Wey

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in svn r931.

Adding override to the functions would have caused errors about functions marked with override but that don't override anything. For the classes that mixin SocketConnectableT but aren't derived form classes that define the mentioned functions.