We're updating the issue view to help you get more done. 

cljs.spec.alpha/fdef with s/* is broken

Description

In ClojureScript 1.10.145, the code below exceeds the call stack on the first call to foo. In ClojureScript 1.9.946 it works as expected (throws a spec exception on the second call to foo).

1 2 3 4 5 6 7 8 9 10 11 12 (ns foo.spec-instrument-test (:require [cljs.spec.alpha :as s] [cljs.spec.test.alpha :as stest])) (enable-console-print!) (defn foo [& args] (prn :got args)) (s/fdef foo :args (s/cat :args (s/* int?))) (stest/instrument) (foo 1 2 3) (foo 1 :hello)
1 2 3 4 5 6 7 8 9 10 11 RangeError: Maximum call stack size exceeded at cljs.core.next (/Users/miikka/mess/2018-10/foo/out/main.js:526:476) at cljs.spec.alpha.deriv (/Users/miikka/mess/2018-10/foo/out/main.js:3698:381) at cljs.spec.alpha.re_conform (/Users/miikka/mess/2018-10/foo/out/main.js:3727:23) at undefined.cljs.spec.alpha.t_cljs$spec$alpha9065.cljs.spec.alpha.t_cljs$spec$alpha9065.cljs$spec$alpha$Spec$conform_STAR_$arity$2 (/Users/miikka/mess/2018-10/foo/out/main.js:3735:93) at cljs.spec.alpha.conform_STAR_ (/Users/miikka/mess/2018-10/foo/out/main.js:3433:117) at cljs.spec.alpha.conform (/Users/miikka/mess/2018-10/foo/out/main.js:3457:264) at /Users/miikka/mess/2018-10/foo/out/main.js:3806:485 at Function.e [as cljs$core$IFn$_invoke$arity$variadic] (/Users/miikka/mess/2018-10/foo/out/main.js:3810:355) at Function.foo.spec_instrument_test.foo.cljs$lang$applyTo (/Users/miikka/mess/2018-10/foo/out/main.js:3850:316) at Function.cljs.core.apply.cljs$core$IFn$_invoke$arity$2 (/Users/miikka/mess/2018-10/foo/out/main.js:899:190)

Environment

1.10.145

Status

Assignee

David Nolen

Reporter

Miikka Koskinen

Labels

Approval

None

Patch

None

Affects versions

1.10.238

Priority

Critical