i'm on 16B03-1, i know about predefined types and if all of them failed i would have had no problem with this, what bugs me is that only tuple is raised as an error, guess it's a bug that's since been fixed, thanks!<br><br>On Tuesday, December 30, 2014, Mark Nijhof <<a href="mailto:mark.nijhof@cre8ivethought.com">mark.nijhof@cre8ivethought.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I actually get:<div><br></div><div><div>src/t.erl:9: type tuple() already defined</div><div>src/t.erl:12: type list() is a builtin type; it cannot be redefined</div><div>src/t.erl:6: Warning: type map is a new builtin type; its (re)definition is allowed only until the next release</div><div><br></div></div><div>Using Erlang 17.3 or 4 (don't seem to be able to get that info after the . anymore)</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 30, 2014 at 8:46 PM, Mark Nijhof <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','mark.nijhof@cre8ivethought.com');" target="_blank">mark.nijhof@cre8ivethought.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Predefined types: <a href="http://www.erlang.org/doc/reference_manual/typespec.html" target="_blank">http://www.erlang.org/doc/reference_manual/typespec.html</a></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Dec 30, 2014 at 5:52 PM, Luis Rascão <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','luis.rascao@gmail.com');" target="_blank">luis.rascao@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi all,<div>I'm having a hard time figuring out why the following code won't compile:</div><div><br></div><div><div><div><div>-module(t).</div><div><br></div><div>-export([test/1]).</div><div><br></div><div>-record(map, {a, b}).</div><div>-type map() :: #map{}.</div><div><br></div><div>-record(tuple, {a, b}).</div><div>-type tuple() :: #tuple{}.</div><div><br></div><div>-record(list, {a, b}).</div><div>-type list() :: #list{}.</div><div><br></div><div>-spec test(map() | tuple() | list()) -> map | tuple | list.</div><div>test(#map{}) -> map;</div><div>test(#tuple{}) -> tuple;</div><div>test(#list{}) -> list.</div></div></div></div><div><br></div><div>erlc t.erl:<br></div><div> t.erl:9: type tuple() already defined<br></div><div><br></div><div>why should the tuple() type throw an error when the others do not?</div></div>
<br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','erlang-questions@erlang.org');" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Mark Nijhof<br><div><div>t: <a href="https://twitter.com/MarkNijhof" target="_blank">@MarkNijhof</a><br>s: marknijhof</div></div><div><br></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Mark Nijhof<br><div><div>t: <a href="https://twitter.com/MarkNijhof" target="_blank">@MarkNijhof</a><br>s: marknijhof</div></div><div><br></div></div></div>
</div>
</blockquote>