Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ecl
ecl
Commits
80c53f0e
Commit
80c53f0e
authored
Mar 16, 2021
by
Marius Gerbershagen
Browse files
cmp: fix (values (values))
This must return nil as a single value while we were returning no values.
parent
36a9c95c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cmp/cmpform.lsp
View file @
80c53f0e
...
...
@@ -184,7 +184,7 @@
(
defun
c1form-single-valued-p
(
form
)
(
or
(
fourth
(
gethash
(
c1form-name
form
)
+c1-form-hash+
))
(
<
=
(
nth-value
1
(
c1form-values-number
form
))
1
)))
(
=
(
nth-value
1
(
c1form-values-number
form
))
1
)))
(
defmacro
with-c1form-env
((
form
value
)
&rest
body
)
`
(
let*
((
,
form
,
value
)
...
...
src/tests/normal-tests/compiler.lsp
View file @
80c53f0e
...
...
@@ -2002,3 +2002,14 @@
(
compile
nil
fun
)))
(
is
(
null
errors-p
))
(
is
(
=
(
funcall
compiled-fun
0
)
2
)))))
;;; Date 2020-08-14
;;; Description
;;;
;;; (values (values)) was miscompiled and returned no value
;;; instead of the correct nil
(
test
cmp.0085.values-values
(
is
(
equal
'
(
nil
)
(
multiple-value-list
(
funcall
(
compile
nil
'
(
lambda
()
(
values
(
values
)))))))))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment