Don <> changed:

           What    |Removed                     |Added
         OS/Version|Mac OS X                    |All

--- Comment #2 from Don <> 2010-08-11 00:51:57 PDT ---
This has to be a bug either in the parser, or in the type transitivity check.

I've added this line to check that the type being passed to the
AliasDeclaration is correctly constructed. This test fails for the cases which
parse.c, 2335. Parser::parseBasicType()

        case TOKconst:
            // const(type)
            t = parseType();
            if (t->isShared())
                t = t->makeSharedConst();
                t = t->makeConst();
+            t->check();

// This test case compiles OK, but it fails the check above.
alias int MyInt;
typedef const (MyInt*) MyConstInt;

It's checking that const(MyInt*) is the same as const(const(MyInt)*) -- but
it's isn't!

So really, the difference between the cases that work, and those which fail, is
simply that the latter are checked. The only cases that pass everything are
ones like:  alias const int* XXX;
So either, makeConst() is wrong, or else AliasDeclaration is calling check()
too early; or the check is wrong. I really don't know which it is.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to