[Issue 7301] RegexMatch opCast!bool not working
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 16 21:34:53 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7301
--- Comment #3 from Jerry Quinn <jlquinn at optonline.net> 2012-01-16 21:34:51 PST ---
(In reply to comment #2)
> This is the same for basic types.
>
> bool foo(){return 2;} // error
> bool bar(){return !2;} // fine
>
> I don't think we are looking at a bug here.
Are you saying that type conversion isn't supposed to happen when a value is
returned?
http://www.d-programming-language.org/statement.html#ReturnStatement says:
"The Expression is implicitly converted to the function return type."
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list