On 17 November 2011 11:09, kenji hara <[email protected]> wrote:
> Withdraw a previous statement, I still argue that is better to apply
> result of inference into mangleof.
> First of all, the pure/safe/nothrow inference runs against only
> function literals and template functions.

This is true at present. But are we confident that it will never apply
to anything else?

> For function literal, its
> type determines in the place its written.For template function, its
> type determines in its instantiation.Both of cases can always see
> their function bodies.

Are we happy to say that when full type inference is used, it does NOT
invoke safe/pure/nothrow inference?

immutable fptr = &foo!(7);
immutable fptr2 = (){ return 0; }

That is, both fptr and fptr2 will always be impure, @system, and throw?
Or does it invoke safe/pure/nothrow inference? In which case the
situation I mentioned arises.
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to