之前
user=> ((fn [x] {:pre (pos? x)} x) -5) ; ouch!
-5
user=> ((fn [x] {:pre [(pos? x)]} x) -5) ; meant this
AssertionError 断言失败: (pos? x) user/eval4075/fn--4076 (form-init5464179453862723045.clj:1)
之后
user=> ((fn [x] {:pre (pos? x)} x) -5)
CompilerException 编译异常 java.lang.IllegalArgumentException: 预和后条件应该是向量,编译:(NO_SOURCE_PATH:1:2)
user=> ((fn [x] {:pre [(pos? x)]} x) -5)
AssertionError 断言失败: (pos? x) user/eval2/fn--3 (NO_SOURCE_FILE:2)
user=> ((fn [x] {:post (pos? x)} x) -5)
CompilerException 编译异常 java.lang.IllegalArgumentException: 预和后条件应该是向量,编译:(NO_SOURCE_PATH:3:2)
user=> ((fn [x] {:post [(pos? x)]} x) -5)
AssertionError 断言失败: (pos? x) user/eval7/fn--8 (NO_SOURCE_FILE:4)
*补丁:* CLJ-1473_v03.patch
*审核人:* Alex Miller