[erlang-questions] Change in abstract format of user-specified -types in 18.0 (breaks PropEr)

Garret Smith garret.smith@REDACTED
Tue Jul 7 02:25:17 CEST 2015

This code:

-type a() :: atom().
-type b() :: a().

has a different abstract syntax in 18.0 vs 17.5 as returned by
epp:parse_file("tt.erl", [])

in 18.0:
     {attribute,4,type,{b,{user_type,4,a,[]},[]}},          <-- user_type

and in 17.0:
     {attribute,4,type,{b,{type,4,a,[]},[]}},                   <-- type

When I use PropEr on a module containing module-defined types like 'b'
above, it fails with: Error: The typeserver encountered an error:

The module I'm checking defines -type point() and uses it in other types.

Question: is this a bug, since 17.x included user_type in the abstract
format, but apparently never actually used it?

If this was an intended fix, I didn't read about it in the release
notes (only about improving the documentation of the abstract format).
Any other code, including parse transforms, that work with the
abstract format could be affected as well.


More information about the erlang-questions mailing list