File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
src/test/clojure/cljs/analyzer Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1+ ; ; Copyright (c) Rich Hickey. All rights reserved.
2+ ; ; The use and distribution terms for this software are covered by the
3+ ; ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4+ ; ; which can be found in the file epl-v10.html at the root of this distribution.
5+ ; ; By using this software in any fashion, you are agreeing to be bound by
6+ ; ; the terms of this license.
7+ ; ; You must not remove this notice, or any other, from this software.
8+
9+ (ns cljs.analyzer.spec-tests
10+ (:require [cljs.analyzer-tests :refer [analyze ns-env]]
11+ [cljs.analyzer.specs :as a]
12+ [clojure.test :as test :refer [deftest is]]
13+ [clojure.spec.alpha :as s]))
14+
15+ (deftest test-if
16+ (is '(s/valid? ::a/node (analyze ns-env '(if true true false )))))
17+
18+ (comment
19+
20+ (test/run-tests )
21+
22+ )
Original file line number Diff line number Diff line change 5252(defmethod node :const [_]
5353 (s/merge ::base
5454 (s/keys
55- :req-un [::literal? ::val ]
56- :opt-un [])))
55+ :req-un [::val ]
56+ ; ; ::literal? is required in the AST REF, but we don't actually use it
57+ ; ; should check tools.analyzer
58+ :opt-un [::literal? ])))
5759
5860(s/def ::keys (s/* ::node ))
5961(s/def ::vals (s/* ::node ))
You can’t perform that action at this time.
0 commit comments