@disabled Propagating to Classes?

Andrew Wiley wiley.andrew.j at gmail.com
Fri Dec 16 12:20:48 PST 2011


Is this a bug?

```
struct SomeStruct {
	@disable this();
	this(int arg) {
	}
}

class SomeClass {
	private:
	SomeStruct _stuff;
	
	public:
	this() {
		_stuff = SomeStruct(10);
	}
}

void someFunc() {
	SomeClass obj = new SomeClass(); // Error: default construction is
disabled for type SomeClass
}
```

It doesn't seem like disabled default constructors should propagate this way.


More information about the Digitalmars-d mailing list