Thread overview | |||||
---|---|---|---|---|---|
|
June 17, 2012 [Issue 8259] New: AssociativeArray seen through with alias parameter and UFCS | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8259 Summary: AssociativeArray seen through with alias parameter and UFCS Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: doob@me.com --- Comment #0 from Jacob Carlborg <doob@me.com> 2012-06-17 10:28:26 PDT --- The following code shows that depending on how a function is called, UFCS or regular syntax, the type of T is inferred differently. If I remove the alias parameter the code behaves as expected. string foo (alias p, T) (T t) { return typeof(t).stringof; } void main () { string[string] aa; auto x = foo!(3 > 4)(aa); auto y = aa.foo!(3 > 4); assert(x == y); writeln("x=", x); writeln("y=", y); } In the above code the assert is triggered. If I remove the assert the code prints: x=string[string] y=AssociativeArray!(string,string) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 20, 2012 [Issue 8259] AssociativeArray seen through with alias parameter and UFCS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | http://d.puremagic.com/issues/show_bug.cgi?id=8259 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-06-20 00:35:11 PDT --- Works in 2.060head. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 20, 2012 [Issue 8259] AssociativeArray seen through with alias parameter and UFCS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | http://d.puremagic.com/issues/show_bug.cgi?id=8259 --- Comment #2 from Jacob Carlborg <doob@me.com> 2012-06-20 04:28:41 PDT --- I does, cool. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation