diff options
author | Tomas Abrahamsson <[email protected]> | 2011-09-15 19:38:23 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-09-16 11:09:05 +0200 |
commit | 9c132d619bb3b88201019a39d064f2852a067fb0 (patch) | |
tree | aab53bc942d75894ac1fd1b9ff593cbebbcdb81a /Makefile.in | |
parent | 68c96ca855821adb42a25ced5b69446ae7ccc635 (diff) | |
download | otp-9c132d619bb3b88201019a39d064f2852a067fb0.tar.gz otp-9c132d619bb3b88201019a39d064f2852a067fb0.tar.bz2 otp-9c132d619bb3b88201019a39d064f2852a067fb0.zip |
Quote atoms if necessary in types
Atoms in some occurrences were not correctly quoted when formatted to
strings, for instance by the typer program. Example:
-module(tb).
-export(['UPPERCASE-FUNCTION-NAME'/0, f1/0, f2/0, f3/0]).
-record('UPPERCASE-RECORD-NAME', {x}).
-record(r2, {'UPPERCASE-FIELD-NAME'}).
-type 'UPPERCASE-TYPE-NAME'() :: integer().
'UPPERCASE-FUNCTION-NAME'() -> ok.
f1() -> #'UPPERCASE-RECORD-NAME'{x=1}.
f2() -> #r2{'UPPERCASE-FIELD-NAME'=1}.
-spec f3() -> 'UPPERCASE-TYPE-NAME'().
f3() -> 1.
Given the program above, the output from typer --plt some.plt tb.erl
resulted in the following specs being printed:
-spec UPPERCASE-FUNCTION-NAME() -> 'ok'.
-spec f1() -> #UPPERCASE-RECORD-NAME{x::1}.
-spec f2() -> #r2{UPPERCASE-FIELD-NAME::1}.
-spec f3() -> UPPERCASE-TYPE-NAME().
This commit changes the output to become the following:
-spec 'UPPERCASE-FUNCTION-NAME'() -> 'ok'.
-spec f1() -> #'UPPERCASE-RECORD-NAME'{x::1}.
-spec f2() -> #r2{'UPPERCASE-FIELD-NAME'::1}.
-spec f3() -> 'UPPERCASE-TYPE-NAME'().
Diffstat (limited to 'Makefile.in')
0 files changed, 0 insertions, 0 deletions