When parsing a function type that contained &optional, the compiler did not eliminate this word before parsing the next argument.

This commit is contained in:
Juan Jose Garcia Ripoll 2010-02-07 10:50:38 +01:00
parent 20d4a35287
commit ff7d1fa480
2 changed files with 7 additions and 1 deletions

View file

@ -28,6 +28,9 @@ ECL 10.2.1:
- Internal variable MP:*ALLOW-WITH-INTERRUPTS* was not declared special.
- The compiler now understands function type proclamations with &optional
values.
* Visible changes:
- Significant speedup in access to hash tables of up to 30% by writing

View file

@ -153,6 +153,7 @@
((null tag1)
(setf c::*compiler-break-enable* t)
;(error "foo")
(break)
(cmpwarn "Unknown type ~S. Assuming it is T." t1)
t2)
(t
@ -545,7 +546,9 @@
(when in-optionals
(cmpwarn "Syntax error in type proclamation for function ~A.~&~A"
fname arg-types))
(setf in-optionals t))
(setf in-optionals t
types (rest types)
expected-type (first types)))
(when (endp fl)
(unless in-optionals
(cmpwarn "Too few arguments for proclaimed function ~A" fname))