www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Parsing error

reply "Nicolas Sicard" <dransic gmail.com> writes:
I'm not sure whether this has been reported:
---
struct Foo {
	void bar(T)() {}
	void baz() {}
}

void main() {
	Foo foo;
	(foo).bar!int();   // Compiler parsing error
	((foo)).bar!int(); // OK
	foo.bar!int();     // OK
	(foo).baz();       // OK
}
---
DMD 2.060 on OS X.

Thanks,
Nicolas
Dec 26 2012
parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, December 26, 2012 14:08:37 Nicolas Sicard wrote:
 I'm not sure whether this has been reported:
 ---
 struct Foo {
 	void bar(T)() {}
 	void baz() {}
 }
 
 void main() {
 	Foo foo;
 	(foo).bar!int();   // Compiler parsing error
 	((foo)).bar!int(); // OK
 	foo.bar!int();     // OK
 	(foo).baz();       // OK
 }
 ---
 DMD 2.060 on OS X.
Check in bugzilla. If you can't find it, then report it. http://d.puremagic.com/issues - Jonathan M Davis
Dec 28 2012
parent "Nicolas Sicard" <dransic gmail.com> writes:
On Friday, 28 December 2012 at 08:46:22 UTC, Jonathan M Davis 
wrote:
 On Wednesday, December 26, 2012 14:08:37 Nicolas Sicard wrote:
 I'm not sure whether this has been reported:
 ---
 struct Foo {
 	void bar(T)() {}
 	void baz() {}
 }
 
 void main() {
 	Foo foo;
 	(foo).bar!int();   // Compiler parsing error
 	((foo)).bar!int(); // OK
 	foo.bar!int();     // OK
 	(foo).baz();       // OK
 }
 ---
 DMD 2.060 on OS X.
Check in bugzilla. If you can't find it, then report it. http://d.puremagic.com/issues - Jonathan M Davis
http://d.puremagic.com/issues/show_bug.cgi?id=9232
Dec 28 2012