Fun (Bad) error message for duplicate definitions in the same toplevel
Izaakwltn opened this issue · 0 comments
Izaakwltn commented
For example:
(coalton-toplevel
(define-type BigType)
(define-struct BigType
(wow String)))
Compiling generates this error:
Execution of a form compiled with errors.
Form:
(COALTON-TOPLEVEL
(DEFINE-TYPE BIGTYPE)
(DEFINE-STRUCT BIGTYPE
(WOW STRING)))
Compile-time error:
(during macroexpansion of (COALTON-TOPLEVEL
(DEFINE-TYPE BIGTYPE)
...))
The value
#S(COALTON-IMPL/SOURCE:LOCATION
:SOURCE #<COALTON-IMPL/SOURCE::SOURCE-FILE {7026C97BB3}>
:SPAN (20 . 41))
is not of type
LIST
[Condition of type SB-INT:COMPILED-PROGRAM-ERROR]