🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by David Callahan Mon, 05 Feb 1990 17:44
contravariance violation
#498
Author: David Callahan
Date: Mon, 05 Feb 1990 17:44
36 lines
1455 bytes
I get the following warning 4 times:  
dom.w:155: warning: contravariance violation for method types ignored

Could some kind soul provide a definition of
 ``contravariance violation for method types''?

Here is dom.w:155:
    	g->dump(node_setup, edge_setup, node_dump, edge_dump);
Here are relevant definitions:
	static void node_setup();
	static void edge_setup();
	static void node_dump(CfgNodeP const n);
	static void edge_dump(CfgEdgeP const e);
	...
	typedef void (*PFV)();
	typedef void (*PFVGnodeP)(GnodeP const);
	typedef void (*PFVGedgeP)(GedgeP const);
	class Graph {
		...
	    void dump(PFV n_setup,
		      PFV e_setup,
		      PFVGnodeP n_dump,
		      PFVGedgeP e_dump);
	}
	class CfgNode : public Gnode { ...
	class CfgEdge : public Gedge { ...


I see that there is a slight type problem involving "node_dump" and 
"edge_dump". Is this the source of the error message. If so, why didi
I get it 4 times?

Thanks,

David Callahan  				       david@tera.com
Tera Computer Co. 400 North 34th Street, Suite 300  Seattle WA, 98103
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads