File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -812,7 +812,7 @@ defmodule Protocol do
812
812
# Without this, a protocol that defines no functions won't be detected
813
813
# as a behaviour by the Erlang compiler, and any implementations of that
814
814
# protocol will log a warning.
815
- @ callback __impl__ ( :foo ) :: module ( )
815
+ @ callback __impl__ ( :for ) :: module ( )
816
816
@ callback __impl__ ( :target ) :: module ( )
817
817
@ callback __impl__ ( :protocol ) :: module ( )
818
818
end
Original file line number Diff line number Diff line change @@ -155,15 +155,11 @@ defmodule ProtocolTest do
155
155
end
156
156
157
157
test "protocol with no functions is a behaviour" do
158
- refute capture_err ( fn ->
159
- Code . eval_string ( """
160
- defprotocol ProtoNoFunctions do
161
- end
162
-
163
- defimpl ProtoNoFunctions, for: Integer do
164
- end
165
- """ )
166
- end ) =~ "module ProtoNoFunctions is not a behaviour"
158
+ defprotocol ProtoNoFunctions do
159
+ end
160
+
161
+ defimpl ProtoNoFunctions , for: Integer do
162
+ end
167
163
end
168
164
169
165
test "protocol defines functions and attributes" do
You can’t perform that action at this time.
0 commit comments