http://d.puremagic.com/issues/show_bug.cgi?id=9659



--- Comment #1 from Kenji Hara <[email protected]> 2013-03-06 22:46:20 PST ---
(In reply to comment #0)
> Code:
> 
> import std.algorithm;
> 
> void main() {
>     alias typeof(splitter(string,string)) SrcType;
> }
> 
> Compiler output:
> test.d(4): Error: string is not an expression
> test.d(4): Error: string is not an expression
> test.d(4): Error: string is not an expression
> test.d(4): Error: string is not an expression
> 
> This is caused by commit 3644943a299b5e50157c8b2f8cfec609fed5fd68; checking 
> out
> the previous commit a73c83becfb9ba0b45af44147b6d7c0edad0978a and rebuilding 
> DMD
> fixes the problem.

That is intended behavior. By fixing issue 8220 (commit 3644943a29), such an
invalid type occurence in expression context is correctly rejected.

In this case, it should be rewritten to:

    alias typeof(splitter(string.init, string.init)) SrcType;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to