[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50219: 28.0.50; Provide better errors when trying to specialize on o
From: |
Eric Abrahamsen |
Subject: |
bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods |
Date: |
Sat, 28 Aug 2021 17:47:12 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On 08/28/21 13:41 PM, Stefan Monnier wrote:
>> (cl-defmethod foo ((a integer) &optional (b string))
>> ...)
>>
>> on the other hand, looks like the person who wrote it wanted to
>> specialise on b, so if the default is something that is a type
>> specifier, then we could output an additional warning about that.
>
> The default value part of args in Common lisp arglists is an
> *expression*, so (b string) just means that `b` should take the value of
> the `string` variable.
>
> The best I can see (if we keep the CL arglist feature) is to try and see
> if that expression looks like a valid CLOS specializer and if so emit
> a warning about possible confusion.
That's a pretty byzantine set of rules! Anyway, I think "reference to
free variable string" is probably close enough to clue the developer in
to what is happening. In the case of an EIEIO class name, though, the
error was:
"`ebdb-record' is an obsolete variable, use `ebdb-record' instead"
which is just...
So maybe something special for class and struct types would be sufficient?
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Eric Abrahamsen, 2021/08/26
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Lars Ingebrigtsen, 2021/08/26
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Eric Abrahamsen, 2021/08/26
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Stefan Monnier, 2021/08/28
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Lars Ingebrigtsen, 2021/08/28
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Stefan Monnier, 2021/08/28
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Lars Ingebrigtsen, 2021/08/28
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Stefan Monnier, 2021/08/28
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Lars Ingebrigtsen, 2021/08/28
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods,
Eric Abrahamsen <=
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Michael Heerdegen, 2021/08/29
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Eric Abrahamsen, 2021/08/29
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Michael Heerdegen, 2021/08/29
- bug#50219: 28.0.50; Provide better errors when trying to specialize on optional args in generic methods, Eric Abrahamsen, 2021/08/29