changeset 1615:8d5c55d163fd

Fix some outdated tests that used auto to mean scope.
author Christian Kamm <kamm incasoftware de>
date Sun, 12 Jul 2009 16:44:52 +0200
parents 709f6451b315
children 7b7967dd4203
files run/a/auto_13_A.d run/a/auto_13_B.d run/a/auto_14_A.d run/a/auto_14_B.d run/a/auto_16_A.d run/a/auto_16_B.d run/a/auto_16_C.d run/a/auto_16_D.d run/a/auto_16_E.d run/a/auto_16_F.d run/auto_01.d run/auto_02.d run/auto_03.d run/auto_04.d run/auto_06.d run/auto_07.d run/auto_08.d run/d/delete_12_A.d run/d/delete_12_B.d run/d/delete_12_D.d run/s/scope_20_A.d run/s/scope_20_B.d run/s/scope_21_A.d run/s/scope_21_B.d run/s/scope_22_A.d run/s/scope_22_B.d run/s/scope_22_C.d run/s/scope_22_D.d run/s/scope_22_E.d run/s/scope_22_F.d run/scope_01.d run/scope_02.d run/scope_03.d run/scope_04.d run/scope_06.d run/scope_07.d run/scope_08.d
diffstat 37 files changed, 721 insertions(+), 721 deletions(-) [+]
line wrap: on
line diff
--- a/run/a/auto_13_A.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Chris Sauls <ibisbasenji@gmail.com>
-// @date@	2005-12-10
-// @uri@	news:dneava$evs$1@digitaldaemon.com
-// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=705
-
-module dstress.run.a.auto_13_A;
-
-int[] status;
-
-class Class {
-	int id;
-
-	this (int id) {
-		this.id = id;
-		status ~= id;
-	}
-
-	~this () {
-		status ~= -id;
-	}
-}
-
-template Template (int id) {
-	auto Class c = new Class(id);
-}
-
-int main () {
-	if(status.length != 0){
-		assert(0);
-	}
-
-	{
-		mixin Template!(1);
-	}
-
-	if(status.length != 2){
-		assert(0);
-	}
-	if(status[0] != 1){
-		assert(0);
-	}
-	if(status[1] != -1){
-		assert(0);
-	}
-
-	{
-		mixin Template!(2);
-	}
-
-	if(status.length != 4){
-		assert(0);
-	}
-	if(status[0] != 1){
-		assert(0);
-	}
-	if(status[1] != -1){
-		assert(0);
-	}
-	if(status[2] != 2){
-		assert(0);
-	}
-	if(status[3] != -2){
-		assert(0);
-	}
-
-	return 0;
-}
-
--- a/run/a/auto_13_B.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Chris Sauls <ibisbasenji@gmail.com>
-// @date@	2005-12-10
-// @uri@	news:dneava$evs$1@digitaldaemon.com
-// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=705
-
-module dstress.run.a.auto_13_B;
-
-int[] status;
-
-class Class {
-	int id;
-
-	this (int id) {
-		this.id = id;
-		status ~= id;
-	}
-
-	~this () {
-		status ~= -id;
-	}
-}
-
-int main () {
-	if(status.length != 0){
-		assert(0);
-	}
-
-	{
-		auto Class c = new Class(1);
-	}
-
-	if(status.length != 2){
-		assert(0);
-	}
-	if(status[0] != 1){
-		assert(0);
-	}
-	if(status[1] != -1){
-		assert(0);
-	}
-
-	{
-		auto Class c = new Class(2);
-	}
-
-	if(status.length != 4){
-		assert(0);
-	}
-	if(status[0] != 1){
-		assert(0);
-	}
-	if(status[1] != -1){
-		assert(0);
-	}
-	if(status[2] != 2){
-		assert(0);
-	}
-	if(status[3] != -2){
-		assert(0);
-	}
-
-	return 0;
-}
-
--- a/run/a/auto_14_A.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Sean Kelly <sean@f4.ca>
-// @date@	2006-01-24
-// @uri@	news:dr5uqg$2hn7$1@digitaldaemon.com
-// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=704
-
-module dstress.run.a.auto_14_A;
-
-bool hadDtor = false;
-
-auto class MyClass{
-	this(){
-		throw new Exception("dummy");
-	}
-
-	~this(){
-		hadDtor = true;
-		throw new Exception("should never throw");
-	}
-}
-
-int main(){
-	try{
-		auto MyClass c;
-		c = new MyClass();
-	}catch{
-		if(!hadDtor){
-			return 0;
-		}else{
-			assert(0);
-		}
-	}
-
-	assert(0);
-}
--- a/run/a/auto_14_B.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Sean Kelly <sean@f4.ca>
-// @date@	2006-01-24
-// @uri@	news:dr5uqg$2hn7$1@digitaldaemon.com
-// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=704
-
-module dstress.run.a.auto_14_B;
-
-bool hadDtor = false;
-
-class MyClass{
-	this(){
-		throw new Exception("dummy");
-	}
-
-	~this(){
-		hadDtor = true;
-		throw new Exception("should never throw");
-	}
-}
-
-int main(){
-
-	try{
-		auto MyClass c;
-		c = new MyClass();
-	}catch{
-		if(!hadDtor){
-			return 0;
-		}else{
-			assert(0);
-		}
-	}
-
-	assert(0);
-}
--- a/run/a/auto_16_A.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	yama <yama_member@pathlink.com>
-// @date@	2006-02-26
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
-
-module dstress.run.a.auto_16_A;
-
-class C{
-	string toString(){
-		return "hallo bug";
-	}
-}
-
-int main(){
-	auto C c;
-	version(all){
-		c = new C();
-	}
-
-	if(c.toString() != "hallo bug"){
-		assert(0);
-	}
-
-	return 0;
-}
-
-
-
--- a/run/a/auto_16_B.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	yama <yama_member@pathlink.com>
-// @date@	2006-02-26
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
-
-// __DSTRESS_DFLAGS__ -version=always
-
-module dstress.run.a.auto_16_B;
-
-class C{
-	string toString(){
-		return "hallo bug";
-	}
-}
-
-int main(){
-	version(always){
-		auto C c;
-		c = new C();
-	}
-
-	if(c.toString() != "hallo bug"){
-		assert(0);
-	}
-
-	return 0;
-}
-
-
-
--- a/run/a/auto_16_C.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	yama <yama_member@pathlink.com>
-// @date@	2006-02-26
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
-
-// __DSTRESS_DFLAGS__ -version=always
-
-module dstress.run.a.auto_16_C;
-
-auto class C{
-	string toString(){
-		return "hallo bug";
-	}
-}
-
-int main(){
-	auto C c;
-	version(always){
-		c = new C();
-	}
-
-	if(c.toString() != "hallo bug"){
-		assert(0);
-	}
-
-	return 0;
-}
-
-
-
--- a/run/a/auto_16_D.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	yama <yama_member@pathlink.com>
-// @date@	2006-02-26
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
-
-// __DSTRESS_DFLAGS__ -version=always
-
-module dstress.run.a.auto_16_D;
-
-auto class C{
-	string toString(){
-		return "hallo bug";
-	}
-}
-
-int main(){
-	version(always){
-		auto C c;
-		c = new C();
-	}
-
-	if(c.toString() != "hallo bug"){
-		assert(0);
-	}
-
-	return 0;
-}
-
-
-
--- a/run/a/auto_16_E.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	yama <yama_member@pathlink.com>
-// @date@	2006-02-26
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
-
-// __DSTRESS_DFLAGS__ -version=always
-
-module dstress.run.a.auto_16_E;
-
-class C{
-	string toString(){
-		return "hallo bug";
-	}
-}
-
-int main(){
-	version(always){
-		auto C c;
-		c = new C();
-	}
-
-	version(always){
-		if(c.toString() != "hallo bug"){
-			assert(0);
-		}
-	}
-
-	return 0;
-}
-
-
-
--- a/run/a/auto_16_F.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	yama <yama_member@pathlink.com>
-// @date@	2006-02-26
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
-
-// __DSTRESS_DFLAGS__ -version=always
-
-module dstress.run.a.auto_16_F;
-
-class C{
-	string toString(){
-		return "hallo bug";
-	}
-}
-
-int main(){
-	version(always){
-		auto C c;
-		c = new C();
-	}
-
-	if((new C()).toString() != "hallo bug"){
-		assert(0);
-	}
-
-	version(always){
-		if(c.toString() != "hallo bug"){
-			assert(0);
-		}
-	}
-
-	return 0;
-}
-
-
-
--- a/run/auto_01.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Sean Kelly <sean@f4.ca>
-// @date@	2004-09-11
-// @uri@	news:chtj6t$24bm$1@digitaldaemon.com
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=1821
-
-module dstress.run.auto_01;
-
-auto class AutoClass{
-	this(){
-		throw new Exception("error msg");
-	}
-	~this(){
-		throw new Exception("should never throw");
-	}
-}
-
-int main(){
-	try{
-		auto AutoClass ac = new AutoClass();
-	}catch{
-		return 0;
-	}
-	assert(0);
-}
--- a/run/auto_02.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Sean Kelly <sean@f4.ca>
-// @date@	2004-09-11
-
-module dstress.run.auto_02;
-
-int status;
-
-auto class AutoClass{
-	void bad(){
-		throw new Exception("error msg");
-	}
-
-	~this(){
-		if(status == 0){
-			status--;
-		}else{
-			status = -100;
-		}
-	}
-}
-
-void test(){
-	try{
-		auto AutoClass ac = new AutoClass();
-		ac.bad();
-	}catch{
-		if(status == -1){
-			status = 20;
-		}
-	}
-
-	if(status != 20){
-		throw new Exception("dtor not called");
-	}
-}
-
-int main(){
-	assert(status == 0);
-
-	test();
-	
-	if(status == 20){
-		return 0;
-	}
-}
--- a/run/auto_03.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Sean Kelly <sean@f4.ca>
-// @date@	2004-09-11
-// @uri@	news:chtj6t$24bm$1@digitaldaemon.com
-// @uri@	nntp://digitalmars.com/digitalmars.D.bugs/1821
-// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1035
-
-module dstress.run.auto_03;
-
-int status;
-
-auto class AutoClass{
-	~this(){
-		if(0 != status){
-			assert(0);
-		}
-		status--;
-		throw new Exception("error msg");
-	}
-}
-
-void test(){
-	if(0 != status){
-		assert(0); 
-	}
-	auto AutoClass ac = new AutoClass();
-}
-
-int main(){
-	try{
-		test();
-	}catch{
-	}
-	
-	if(status==-1){
-		return 0;
-	}
-	assert(0);
-}
--- a/run/auto_04.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Sean Kelly <sean@f4.ca>
-// @date@	2004-09-11
-// @uri@	news:chtj6t$24bm$1@digitaldaemon.com
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=1821
-
-module dstress.run.auto_04;
-
-int status;
-
-auto class AutoClass{
-	this(){
-		if(0 != status){
-			assert(0);
-		}
-		status+=2;
-	}
-	~this(){
-		if(2 != status){
-			assert(0);
-		}
-		status--;
-		throw new Exception("error msg");
-	}
-}
-
-void check(){
-	auto AutoClass ac = new AutoClass();
-	throw new Exception("check error");
-}
-
-int main(){
-	if(0 != status){ assert(0); }
-	try{
-		check();
-	}catch{
-		if(1 != status){ assert(0); }
-		status-=5;
-	}
-	
-	if(status==-4){
-		return 0;
-	}
-	assert(0);
-}
--- a/run/auto_06.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-module dstress.run.auto_06;
-
-int status;
-
-auto class A{
-	int cond;
-
-	this(int cond){
-		this.cond=cond;
-	}
-
-	~this(){
-		if(cond != status){
-			assert(0);
-		}
-		status--;
-	}
-}
-
-void test(){
-	auto A a = new A(-1);
-	auto A b = new A(0);
-}
-
-int main(){
-	test();
-	
-	if(status==-2){
-		return 0;
-	}
-}
--- a/run/auto_07.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Sean Kelly <sean@f4.ca>
-// @date@	2005-04-14
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3645
-
-module dstress.run.auto_07;
-
-int status;
-
-auto class Parent{
-}
-
-auto class Child : Parent{
-	this(){
-		if(0 != status){
-			assert(0);
-		}
-		status=1;
-	}    
-
-	~this(){
-		if(1 != status){
-			assert(0);
-		}
-		status=2;
-	}
-}
-
-void test(){
-	auto Parent o = new Child();
-	if(1 != status){
-		assert(0);
-	}
-}
-
-int main(){
-	test();
-	
-	if(status==2){
-		return 0;
-	}
-
-	assert(0);
-}
-
--- a/run/auto_08.d	Mon May 25 20:07:04 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-// @author@	Sean Kelly <sean@f4.ca>
-// @date@	2005-04-14
-// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3645
-
-module dstress.run.auto_08;
-
-int status;
-
-auto class Parent{
-}
-
-auto class Child : Parent{
-	this(){
-		if(0 != status){
-			assert(0);
-		}
-		status=1;
-	}    
-
-	~this(){
-		if(1 != status){
-			assert(0); 
-		}
-		status=2;
-	}
-}
-
-void test(){
-	auto Child o = new Child();
-	if(1 != status){
-		assert(0);
-	}
-}
-
-int main(){
-	test();
-	
-	if(status==2){
-		return 0;
-	}
-	assert(0);
-}
-
--- a/run/d/delete_12_A.d	Mon May 25 20:07:04 2009 +0200
+++ b/run/d/delete_12_A.d	Sun Jul 12 16:44:52 2009 +0200
@@ -31,7 +31,7 @@
 }
 
 void test(){
-	auto Foo f = new Foo();
+	scope Foo f = new Foo();
 }
 
 int main(){
--- a/run/d/delete_12_B.d	Mon May 25 20:07:04 2009 +0200
+++ b/run/d/delete_12_B.d	Sun Jul 12 16:44:52 2009 +0200
@@ -33,7 +33,7 @@
 }
 
 void test(){
-	auto Foo f = new Foo();
+	scope Foo f = new Foo();
 }
 
 int main(){
--- a/run/d/delete_12_D.d	Mon May 25 20:07:04 2009 +0200
+++ b/run/d/delete_12_D.d	Sun Jul 12 16:44:52 2009 +0200
@@ -33,7 +33,7 @@
 }
 
 void test(){
-	auto Foo f = new Foo();
+	scope Foo f = new Foo();
 	delete f;
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_20_A.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,72 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Chris Sauls <ibisbasenji@gmail.com>
+// @date@	2005-12-10
+// @uri@	news:dneava$evs$1@digitaldaemon.com
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=705
+
+module dstress.run.s.scope_20_A;
+
+int[] status;
+
+class Class {
+	int id;
+
+	this (int id) {
+		this.id = id;
+		status ~= id;
+	}
+
+	~this () {
+		status ~= -id;
+	}
+}
+
+template Template (int id) {
+	scope Class c = new Class(id);
+}
+
+int main () {
+	if(status.length != 0){
+		assert(0);
+	}
+
+	{
+		mixin Template!(1);
+	}
+
+	if(status.length != 2){
+		assert(0);
+	}
+	if(status[0] != 1){
+		assert(0);
+	}
+	if(status[1] != -1){
+		assert(0);
+	}
+
+	{
+		mixin Template!(2);
+	}
+
+	if(status.length != 4){
+		assert(0);
+	}
+	if(status[0] != 1){
+		assert(0);
+	}
+	if(status[1] != -1){
+		assert(0);
+	}
+	if(status[2] != 2){
+		assert(0);
+	}
+	if(status[3] != -2){
+		assert(0);
+	}
+
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_20_B.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,68 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Chris Sauls <ibisbasenji@gmail.com>
+// @date@	2005-12-10
+// @uri@	news:dneava$evs$1@digitaldaemon.com
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=705
+
+module dstress.run.s.scope_20_B;
+
+int[] status;
+
+class Class {
+	int id;
+
+	this (int id) {
+		this.id = id;
+		status ~= id;
+	}
+
+	~this () {
+		status ~= -id;
+	}
+}
+
+int main () {
+	if(status.length != 0){
+		assert(0);
+	}
+
+	{
+		scope Class c = new Class(1);
+	}
+
+	if(status.length != 2){
+		assert(0);
+	}
+	if(status[0] != 1){
+		assert(0);
+	}
+	if(status[1] != -1){
+		assert(0);
+	}
+
+	{
+		scope Class c = new Class(2);
+	}
+
+	if(status.length != 4){
+		assert(0);
+	}
+	if(status[0] != 1){
+		assert(0);
+	}
+	if(status[1] != -1){
+		assert(0);
+	}
+	if(status[2] != 2){
+		assert(0);
+	}
+	if(status[3] != -2){
+		assert(0);
+	}
+
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_21_A.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,38 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Sean Kelly <sean@f4.ca>
+// @date@	2006-01-24
+// @uri@	news:dr5uqg$2hn7$1@digitaldaemon.com
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=704
+
+module dstress.run.s.scope_21_A;
+
+bool hadDtor = false;
+
+scope class MyClass{
+	this(){
+		throw new Exception("dummy");
+	}
+
+	~this(){
+		hadDtor = true;
+		throw new Exception("should never throw");
+	}
+}
+
+int main(){
+	try{
+		scope MyClass c;
+		c = new MyClass();
+	}catch{
+		if(!hadDtor){
+			return 0;
+		}else{
+			assert(0);
+		}
+	}
+
+	assert(0);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_21_B.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,39 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Sean Kelly <sean@f4.ca>
+// @date@	2006-01-24
+// @uri@	news:dr5uqg$2hn7$1@digitaldaemon.com
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=704
+
+module dstress.run.s.scope_21_B;
+
+bool hadDtor = false;
+
+class MyClass{
+	this(){
+		throw new Exception("dummy");
+	}
+
+	~this(){
+		hadDtor = true;
+		throw new Exception("should never throw");
+	}
+}
+
+int main(){
+
+	try{
+		scope MyClass c;
+		c = new MyClass();
+	}catch{
+		if(!hadDtor){
+			return 0;
+		}else{
+			assert(0);
+		}
+	}
+
+	assert(0);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_22_A.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	yama <yama_member@pathlink.com>
+// @date@	2006-02-26
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
+
+module dstress.run.s.scope_22_A;
+
+class C{
+	char[] toString(){
+		return "hallo bug";
+	}
+}
+
+int main(){
+	scope C c;
+	version(all){
+		c = new C();
+	}
+
+	if(c.toString() != "hallo bug"){
+		assert(0);
+	}
+
+	return 0;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_22_B.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,33 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	yama <yama_member@pathlink.com>
+// @date@	2006-02-26
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
+
+// __DSTRESS_DFLAGS__ -version=always
+
+module dstress.run.s.scope_22_B;
+
+class C{
+	char[] toString(){
+		return "hallo bug";
+	}
+}
+
+int main(){
+	version(always){
+		scope C c;
+		c = new C();
+	}
+
+	if(c.toString() != "hallo bug"){
+		assert(0);
+	}
+
+	return 0;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_22_C.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,33 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	yama <yama_member@pathlink.com>
+// @date@	2006-02-26
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
+
+// __DSTRESS_DFLAGS__ -version=always
+
+module dstress.run.s.scope_22_C;
+
+scope class C{
+	char[] toString(){
+		return "hallo bug";
+	}
+}
+
+int main(){
+	scope C c;
+	version(always){
+		c = new C();
+	}
+
+	if(c.toString() != "hallo bug"){
+		assert(0);
+	}
+
+	return 0;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_22_D.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,33 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	yama <yama_member@pathlink.com>
+// @date@	2006-02-26
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
+
+// __DSTRESS_DFLAGS__ -version=always
+
+module dstress.run.s.scope_22_D;
+
+scope class C{
+	char[] toString(){
+		return "hallo bug";
+	}
+}
+
+int main(){
+	version(always){
+		scope C c;
+		c = new C();
+	}
+
+	if(c.toString() != "hallo bug"){
+		assert(0);
+	}
+
+	return 0;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_22_E.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	yama <yama_member@pathlink.com>
+// @date@	2006-02-26
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
+
+// __DSTRESS_DFLAGS__ -version=always
+
+module dstress.run.s.scope_22_E;
+
+class C{
+	char[] toString(){
+		return "hallo bug";
+	}
+}
+
+int main(){
+	version(always){
+		scope C c;
+		c = new C();
+	}
+
+	version(always){
+		if(c.toString() != "hallo bug"){
+			assert(0);
+		}
+	}
+
+	return 0;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_22_F.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,39 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	yama <yama_member@pathlink.com>
+// @date@	2006-02-26
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6373
+
+// __DSTRESS_DFLAGS__ -version=always
+
+module dstress.run.s.scope_22_F;
+
+class C{
+	char[] toString(){
+		return "hallo bug";
+	}
+}
+
+int main(){
+	version(always){
+		scope C c;
+		c = new C();
+	}
+
+	if((new C()).toString() != "hallo bug"){
+		assert(0);
+	}
+
+	version(always){
+		if(c.toString() != "hallo bug"){
+			assert(0);
+		}
+	}
+
+	return 0;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/scope_01.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,28 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Sean Kelly <sean@f4.ca>
+// @date@	2004-09-11
+// @uri@	news:chtj6t$24bm$1@digitaldaemon.com
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=1821
+
+module dstress.run.scope_01;
+
+scope class ScopeClass{
+	this(){
+		throw new Exception("error msg");
+	}
+	~this(){
+		throw new Exception("should never throw");
+	}
+}
+
+int main(){
+	try{
+		scope ScopeClass ac = new ScopeClass();
+	}catch{
+		return 0;
+	}
+	assert(0);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/scope_02.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,49 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Sean Kelly <sean@f4.ca>
+// @date@	2004-09-11
+
+module dstress.run.scope_02;
+
+int status;
+
+scope class ScopeClass{
+	void bad(){
+		throw new Exception("error msg");
+	}
+
+	~this(){
+		if(status == 0){
+			status--;
+		}else{
+			status = -100;
+		}
+	}
+}
+
+void test(){
+	try{
+		scope ScopeClass ac = new ScopeClass();
+		ac.bad();
+	}catch{
+		if(status == -1){
+			status = 20;
+		}
+	}
+
+	if(status != 20){
+		throw new Exception("dtor not called");
+	}
+}
+
+int main(){
+	assert(status == 0);
+
+	test();
+	
+	if(status == 20){
+		return 0;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/scope_03.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,42 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Sean Kelly <sean@f4.ca>
+// @date@	2004-09-11
+// @uri@	news:chtj6t$24bm$1@digitaldaemon.com
+// @uri@	nntp://digitalmars.com/digitalmars.D.bugs/1821
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1035
+
+module dstress.run.scope_03;
+
+int status;
+
+scope class ScopeClass{
+	~this(){
+		if(0 != status){
+			assert(0);
+		}
+		status--;
+		throw new Exception("error msg");
+	}
+}
+
+void test(){
+	if(0 != status){
+		assert(0); 
+	}
+	scope ScopeClass ac = new ScopeClass();
+}
+
+int main(){
+	try{
+		test();
+	}catch{
+	}
+	
+	if(status==-1){
+		return 0;
+	}
+	assert(0);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/scope_04.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,48 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Sean Kelly <sean@f4.ca>
+// @date@	2004-09-11
+// @uri@	news:chtj6t$24bm$1@digitaldaemon.com
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=1821
+
+module dstress.run.scope_04;
+
+int status;
+
+scope class ScopeClass{
+	this(){
+		if(0 != status){
+			assert(0);
+		}
+		status+=2;
+	}
+	~this(){
+		if(2 != status){
+			assert(0);
+		}
+		status--;
+		throw new Exception("error msg");
+	}
+}
+
+void check(){
+	scope ScopeClass ac = new ScopeClass();
+	throw new Exception("check error");
+}
+
+int main(){
+	if(0 != status){ assert(0); }
+	try{
+		check();
+	}catch{
+		if(1 != status){ assert(0); }
+		status-=5;
+	}
+	
+	if(status==-4){
+		return 0;
+	}
+	assert(0);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/scope_06.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.run.scope_06;
+
+int status;
+
+scope class A{
+	int cond;
+
+	this(int cond){
+		this.cond=cond;
+	}
+
+	~this(){
+		if(cond != status){
+			assert(0);
+		}
+		status--;
+	}
+}
+
+void test(){
+	scope A a = new A(-1);
+	scope A b = new A(0);
+}
+
+int main(){
+	test();
+	
+	if(status==-2){
+		return 0;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/scope_07.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,48 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Sean Kelly <sean@f4.ca>
+// @date@	2005-04-14
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3645
+
+module dstress.run.scope_07;
+
+int status;
+
+scope class Parent{
+}
+
+scope class Child : Parent{
+	this(){
+		if(0 != status){
+			assert(0);
+		}
+		status=1;
+	}    
+
+	~this(){
+		if(1 != status){
+			assert(0);
+		}
+		status=2;
+	}
+}
+
+void test(){
+	scope Parent o = new Child();
+	if(1 != status){
+		assert(0);
+	}
+}
+
+int main(){
+	test();
+	
+	if(status==2){
+		return 0;
+	}
+
+	assert(0);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/scope_08.d	Sun Jul 12 16:44:52 2009 +0200
@@ -0,0 +1,47 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Sean Kelly <sean@f4.ca>
+// @date@	2005-04-14
+// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3645
+
+module dstress.run.scope_08;
+
+int status;
+
+scope class Parent{
+}
+
+scope class Child : Parent{
+	this(){
+		if(0 != status){
+			assert(0);
+		}
+		status=1;
+	}    
+
+	~this(){
+		if(1 != status){
+			assert(0); 
+		}
+		status=2;
+	}
+}
+
+void test(){
+	scope Child o = new Child();
+	if(1 != status){
+		assert(0);
+	}
+}
+
+int main(){
+	test();
+	
+	if(status==2){
+		return 0;
+	}
+	assert(0);
+}
+