Single :tag for type hints conflates value's type with type of return value from an invoke

Description

The value of a Var can be operated on directly, or, if it is a fn, it can be invoked and the resulting value operated on. :tag metadata on a Var is used to provide a type hint to the compiler to avoid reflection. Having a single metadata key for this two distinct uses makes it possible (even easy, if unlikely) to create a situation where type-hinting the value causes a ClassCastException on an operation on the invocation return value, or the reverse. The only obvious solution is two use different keys for the two uses.

Environment

None

Activity

Show:
import
August 24, 2010, 9:51 AM

Comment made by: importer

Converted from http://www.assembla.com/spaces/clojure/tickets/140

Assignee

Unassigned

Reporter

import

Labels

Approval

None

Patch

None

Priority

Major
Configure