Bug 8180 – UFCS writeln doesn't work with Tuples

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-01T13:25:00Z
Last change time
2012-06-15T17:01:14Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-06-01T13:25:28Z
import std.stdio, std.typecons; void main() { static struct Foo { int x; } auto f = Foo(20); f.writeln(); // OK Tuple!(int) t = tuple(10); t.writeln(); // error } dmd 2.060alpha gives test.d(7): Error: not a property t.writeln test.d(7): Error: function expected before (), not writeln(t) of type void
Comment #1 by k.hara.pg — 2012-06-03T21:38:13Z
This compiler bug. Changed 'component' to DMD. https://github.com/D-Programming-Language/dmd/pull/979
Comment #2 by github-bugzilla — 2012-06-15T15:12:40Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e9538dc00db8789ab1f686f0a0a2bed7316ee794 fix Issue 8180 - UFCS writeln doesn't work with Tuples https://github.com/D-Programming-Language/dmd/commit/c7e14655b631365083c6577cd3212877fa87b713 Merge pull request #979 from 9rnsr/fix_ufcs Fix issue 8180 and increase consistency of UFCS lookup