Details
-
Type:
Defect
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: Release 1.5
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Approval:Vetted
Description
The compiler accepts both of these erroneous forms which while silly, are not imposible to come up with.
(defprotocol Foo (f ([this]) ([this arg])))
(defprotocol Bar (m [this]) (m [this arg]))
Activity
Timothy Baldridge
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Approval | Vetted [ 10003 ] | |
| Affects Version/s | Release 1.5 [ 10150 ] |
Can not reproduce the fist error:
user=> (defprotocol Foo (f ([this]) ([this arg])))
CompilerException java.lang.IllegalArgumentException: Parameter declaration missing, compiling:(NO_SOURCE_PATH:5:1)
But the 2nd one I can reproduce:
user=> (defprotocol Bar (m [this]) (m [this arg]))
Bar
user=> Bar
{:on-interface user.Bar, :on user.Bar, :sigs {:m {:doc nil, :arglists ([this arg]), :name m}}, :var #'user/Bar, :method-map {:m :m}, :method-builders {#'user/m #<user$eval71$fn_72 user$eval71$fn_72@1a2b53fb>}}
user=>
Notice that :arglists only has one entry
Vetting