digitalmars.D.bugs - [Issue 7275] New: Cannot use property function call in case/case range statement
- d-bugmail puremagic.com (41/41) Jan 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7275
- d-bugmail puremagic.com (12/12) Jan 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7275
- d-bugmail puremagic.com (12/12) Oct 07 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7275
http://d.puremagic.com/issues/show_bug.cgi?id=7275
Summary: Cannot use property function call in case/case range
statement
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: k.hara.pg gmail.com
Property function call in case/case range statement doesn't work well.
Example:
----
void main()
{
property int bar1(){ return 0; }
property int bar2(){ return 1; }
property int bar3(){ return 2; }
switch (0){
case bar1: break; // Line 8
case bar2: .. // Line 9
case bar3: break; // Line 10
default: break;
}
}
Output:
----
test.d(8): Error: cannot implicitly convert expression (bar1) of type property
int() to int
test.d(9): Error: cannot implicitly convert expression (bar2) of type property
int() to int
test.d(10): Error: cannot implicitly convert expression (bar3) of type
property int() to int
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 11 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7275
Kenji Hara <k.hara.pg gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Platform|Other |All
OS/Version|Windows |All
https://github.com/D-Programming-Language/dmd/pull/599
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 11 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7275
yebblies <yebblies gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |yebblies gmail.com
Resolution| |FIXED
https://github.com/D-Programming-Language/dmd/commit/f4ec500d57e53dde1fe5ce6091dec52ae649b044
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 07 2012









d-bugmail puremagic.com 