Inferred return type of namespace is string

Description

The namespace function is inferred to return type string, even though it can return nil.

I believe that this is due to an inappropriate ^string in the INamed protocol definition.

Environment

None

Activity

Show:
Martin Kučera
September 6, 2018, 2:00 PM

Corrected type inference of the INamed protocol method namespace to #{string clj-nil}.

Mike Fikes
September 7, 2018, 7:56 PM

Confirmed with Martin Kučera via Slack that CA has been signed.

Mike Fikes
September 7, 2018, 8:34 PM

I've confirmed that this patch works correctly. Forms like (namespace :ab/c) are now inferred as returning #{string clj-nil}

Mike Fikes
November 22, 2018, 2:09 PM

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

Approval

Accepted

Patch

Code

Priority

Major
Configure