core.typed

clojure.lang.RT/nth's type doesn't currently allow nil as the first argument

Details

  • Type: Defect Defect
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: 0.3.8, 0.3.x
  • Component/s: Clojure Checker
  • Labels:
    None
  • Patch:
    Code and Test

Description

Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj

I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check.

Pull request: CTYP-27
Patch: ctyp-27.patch
Commit: f4c699d
Release: 0.3.8

Activity

Hide
Ambrose Bonnaire-Sergeant added a comment -

Sorry, master is a bit broken at the moment. It may take a week to get it stable actually!

Show
Ambrose Bonnaire-Sergeant added a comment - Sorry, master is a bit broken at the moment. It may take a week to get it stable actually!
Hide
Ambrose Bonnaire-Sergeant added a comment -

This needs a special case for invoke-nth, to handle things like (nth (I (Seqable x) (CountRange 1)) 0).

Show
Ambrose Bonnaire-Sergeant added a comment - This needs a special case for invoke-nth, to handle things like (nth (I (Seqable x) (CountRange 1)) 0).
Ambrose Bonnaire-Sergeant made changes -
Field Original Value New Value
Description Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(
h2. Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

h2. Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

h2. Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(

*Pull request*:
*Patch*:
Ambrose Bonnaire-Sergeant made changes -
Description h2. Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

h2. Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

h2. Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(

*Pull request*:
*Patch*:
h2. Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

h2. Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

h2. Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(

*Pull request*: [CTYP-27|https://github.com/typedclojure/core.typed/pull/29]
*Patch*:
Fix Version/s Release.Next [ 10550 ]
Ambrose Bonnaire-Sergeant made changes -
Component/s Clojure Checker [ 10007 ]
Ambrose Bonnaire-Sergeant made changes -
Priority Major [ 3 ] Minor [ 4 ]
Ambrose Bonnaire-Sergeant made changes -
Patch Code and Test [ 10002 ]
Description h2. Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

h2. Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

h2. Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(

*Pull request*: [CTYP-27|https://github.com/typedclojure/core.typed/pull/29]
*Patch*:
h2. Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

h2. Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

h2. Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(

*Pull request*: [CTYP-27|https://github.com/typedclojure/core.typed/pull/29]
*Patch*: ctyp-27.patch
Attachment ctyp-27.patch [ 14604 ]
Ambrose Bonnaire-Sergeant made changes -
Description h2. Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

h2. Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

h2. Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(

*Pull request*: [CTYP-27|https://github.com/typedclojure/core.typed/pull/29]
*Patch*: ctyp-27.patch
h2. Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

h2. Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

h2. Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(

*Pull request*: [CTYP-27|https://github.com/typedclojure/core.typed/pull/29]
*Patch*: ctyp-27.patch
*Commit*: [f4c699d|https://github.com/typedclojure/core.typed/commit/f4c699d7306345716bd810bc9faa82bb170a2678]
*Release*: 0.3.8
Fix Version/s 0.3.8 [ 10555 ]
Ambrose Bonnaire-Sergeant made changes -
Description h2. Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

h2. Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

h2. Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(

*Pull request*: [CTYP-27|https://github.com/typedclojure/core.typed/pull/29]
*Patch*: ctyp-27.patch
*Commit*: [f4c699d|https://github.com/typedclojure/core.typed/commit/f4c699d7306345716bd810bc9faa82bb170a2678]
*Release*: 0.3.8
h2. Problem

The destructuring of (let [[x] [1 2 3]] x) is type checked differently to
(first [1 2 3]), the former being a type error.

h2. Solution

Already fixed sometime around 0.1.18, but adding tests to prove this works.

h2. Notes

Re: Why (first [1 2 3]) isn't equivalent to (let [[x & xs] [1 2 3]] x)
"
; This is because clojure.lang.RT/nth's type doesn't currently allow nil as
; the first argument. Should be fixed in master, but please submit a bug report to
; JIRA, it might not be completely correct.
; -Ambrose"

From
https://github.com/frenchy64/type-examples/blob/master/src/type_examples/core.clj


I'm not sure if this is fixed in master, but I couldn't build the current 0.1.18-SNAPSHOT (master) to check. :(

*Pull request*: [CTYP-27|https://github.com/typedclojure/core.typed/pull/29]
*Patch*: ctyp-27.patch
*Commit*: [f4c699d|https://github.com/clojure/core.typed/commit/f4c699d7306345716bd810bc9faa82bb170a2678]
*Release*: 0.3.8
Ambrose Bonnaire-Sergeant made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: