Invalid variadic IFn implementations now fail

Description

This code is invalid but worked prior to 1.9.655. We don't currently warn on variadic implementations and this triggers the compiler to generate a variadic method.

The user will see a cryptic error about `self__` not being defined when attempting to leverage this invalid pattern.

Environment

None

Activity

Show:
Dieter Komendera
December 5, 2018, 6:48 AM

This relevant code in reagent has been fixed with https://github.com/reagent-project/reagent/commit/3cf045dc8264373d93d9c3a7607dc2a349194681#diff-9ca1adc3660082ab6f20b66f7c7a911c and was released with 0.7.0 (2017-06-27)

Mike Fikes
June 27, 2017, 1:38 PM

See CLJS-2134, which will emit a new diagnostic in this scenario.

David Nolen
June 27, 2017, 1:02 PM

There is no such thing as variadic IFn or variadic protocols at all.

Andre R
June 27, 2017, 12:14 PM

Issue seems to be reagent that uses variadic IFn:

https://github.com/reagent-project/reagent/blob/18cb1468a671f5a96a912d2e3ccc13bbdbf3a68e/src/reagent/impl/util.cljs#L69-L72

Related:

Possibly a regression of: CLJS-1445

Completed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

Dieter Komendera

Approval

Accepted