problem with inheritance of FilterStream

Derek Parnell derek at psych.ward
Sun Dec 30 12:52:36 PST 2007


On Sun, 30 Dec 2007 17:52:41 +0100, bayo wrote:

> Hello.
> 
> Iv got a problem today i never seen befor. Maybe its the first time i
> inherite a phobos class, i realy dont know.
> 
> When i create instance of Foo, the printf (maybe) generate an
> "Error: Access Violation". 

This is the problem. It is using the wrong 'printf'. The code below works.

 
 import std.stream;
 import std.stdio;

 class Foo : FilterStream {
 	this (Stream stream) {
 		std.stdio.printf("foo\n");
 		super(stream);
 	}
 }
 
 unittest {
 	printf("begin\n");
 	new Foo(null);
 	printf("end\n");
 }

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell


More information about the Digitalmars-d-bugs mailing list