[Issue 2862] ICE(template.c) using type tuple as function argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 23 23:15:49 PDT 2009


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



--- Comment #3 from Don <clugdbug at yahoo.com.au> 2009-10-23 23:15:46 PDT ---
Aargh, this doesn't work because types ARE valid function arguments inside type
expressions. There does not seem to be better place to catch this error
(functionArguments is too late).
So a superficial patch is just to turn the ICE into an error message. It's not
obvious how to phrase the error message so that it makes sense though.

template.c line 4226.

        else
        {
+        if (ta->ty==Ttuple) {
+            ta->error(loc, "Type tuple %s is not a valid template argument",
ta->toChars());
+            continue;        
+        }

#ifdef DEBUG
        printf("ta = %d, %d, %s\n", ta->ty, Ttuple, ta->toChars());
#endif
        assert(global.errors);
        }

-- 
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