Skip to content

Instantly share code, notes, and snippets.

@umurgdk
Created December 28, 2013 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umurgdk/8155227 to your computer and use it in GitHub Desktop.
Save umurgdk/8155227 to your computer and use it in GitHub Desktop.
elixir @type, @SPEC test
defmodule DumbModule do
@type dumb_type :: :a | :b
@spec dumb_function(dumb_type) :: dumb_type
def dumb_function(_data) do
:c
end
end
@umurgdk
Copy link
Author

umurgdk commented Dec 28, 2013

dialyzer warns me with
hello_world_handler.ex:5: Invalid type specification for function 'Elixir.Tutorial.HelloWorldHandler':dede/0. The success typing is () -> 'c'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment