:rettag encourages wrong runtime type hints

Description

Currently :rettag works only for expressions like:

or

But at runtime those type-hints are resolved to

and

which can cause the compiler to fail, see CLJ-1674 for an example

Patch: clj-1805.patch fixes the bad boolean logic mentioned in the comments.

Environment

None

Attachments

1

Activity

Show:

Nicola Mometto November 11, 2015 at 7:18 PM

I'm hoping to have the questions I've raised re: why are we keeping :rettag around if it serves no purpose answered before 1.8 is released

Alex Miller November 9, 2015 at 9:48 PM

I'm re-closing this as the ticket really was intended to be a question about rettag's role and purpose. I have added that to a list of items to discuss with Rich.

Nicola Mometto October 31, 2015 at 4:00 PM

No, :rettag is still just compile-time metadata

Andy Fingerhut October 30, 2015 at 7:58 PM

Nicola, could it be that Rich wants to add :rettag to make a single common place to go to find that information that is in metadata on the function, as opposed to more deeply hidden inside the compiler?

Nicola Mometto October 29, 2015 at 4:05 PM

Correct.
:rettag was never intended (as far as I understan by RIch's commits) to have any behavioural change, rather it should have served as an optimization to avoid checkcasts/boxing w/ direct-linking, but it doesn't work so I see no point in keeping non-working code around that might even cause some tooling libraries to error-out (like eastwood).

Completed

Details

Assignee

Reporter

Labels

Approval

Ok

Patch

Code

Priority

Affects versions

Fix versions

Created August 28, 2015 at 6:16 PM
Updated November 11, 2015 at 7:18 PM
Resolved November 11, 2015 at 7:18 PM