       assert [type: {:my_type, {:type, _, :term, []}, []}] = types(bytecode)
     end
 
-    test "@type with an atom" do
-      bytecode =
-        test_module do
-          @type my_type :: :foo
-        end
-
-      assert [type: {:my_type, {:atom, _, :foo}, []}] = types(bytecode)
-    end
-
-    test "@type with an atom alias" do
-      bytecode =
-        test_module do
-          @type my_type :: Atom
-        end
-
-      assert [type: {:my_type, {:atom, _, Atom}, []}] = types(bytecode)
+    test "@type with an atom/alias" do
+      bytecode =
+        test_module do
+          @type foo :: :foo
+          @type bar :: Bar
+        end
+
+      assert [
+               type: {:bar, {:atom, _, Bar}, []},
+               type: {:foo, {:atom, _, :foo}, []}
+             ] = types(bytecode)
     end
 
     test "@type with an integer" do
       bytecode =
         test_module do
-          @type my_type :: 10
-        end
-
-      assert [type: {:my_type, {:integer, _, 10}, []}] = types(bytecode)
-    end
-
-    test "@type with a negative integer" do
-      bytecode =
-        test_module do
-          @type my_type :: -10
-        end
-
-      assert [type: {:my_type, {:op, _, :-, {:integer, _, 10}}, []}] = types(bytecode)
+          @type pos :: 10
+          @type neg :: -10
+        end
+
+      assert [
+               type: {:neg, {:op, _, :-, {:integer, _, 10}}, []},
+               type: {:pos, {:integer, _, 10}, []}
+             ] = types(bytecode)
     end
 
     test "@type with a remote type" do

               type
    end

    test "@spec(spec) with guards" do
      bytecode =
        test_module do
          def my_fun1(x), do: x

      end
    end

    test "invalid optional callback" do
      assert_raise CompileError, ~r"invalid optional callback :foo", fn ->
        test_module do
          @optional_callbacks :foo
