From ff7d1fa4804e9d54159ba9051436261de31befd3 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sun, 7 Feb 2010 10:50:38 +0100 Subject: [PATCH] When parsing a function type that contained &optional, the compiler did not eliminate this word before parsing the next argument. --- src/CHANGELOG | 3 +++ src/cmp/cmptype.lsp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CHANGELOG b/src/CHANGELOG index b5d021e90..46b9a9e16 100755 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -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 diff --git a/src/cmp/cmptype.lsp b/src/cmp/cmptype.lsp index 8ec00daff..6bc924d90 100644 --- a/src/cmp/cmptype.lsp +++ b/src/cmp/cmptype.lsp @@ -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))