aboutsummaryrefslogtreecommitdiffstats
path: root/lib/typer/src
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-02-06 12:28:12 +0200
committerStavros Aronis <[email protected]>2011-02-06 12:29:17 +0200
commitee9ff644f20818c660cc66d5f155283b91214574 (patch)
tree200dcfcfd90d23a47626553a0a8e112beef9ec23 /lib/typer/src
parent8522aaffd9ff146492808ae2a5be9ef58e4e8b90 (diff)
downloadotp-ee9ff644f20818c660cc66d5f155283b91214574.tar.gz
otp-ee9ff644f20818c660cc66d5f155283b91214574.tar.bz2
otp-ee9ff644f20818c660cc66d5f155283b91214574.zip
Fix Typer's hanging when module name doesn't match filename
Diffstat (limited to 'lib/typer/src')
-rw-r--r--lib/typer/src/typer_info.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/typer/src/typer_info.erl b/lib/typer/src/typer_info.erl
index df0b4448f3..1387245064 100644
--- a/lib/typer/src/typer_info.erl
+++ b/lib/typer/src/typer_info.erl
@@ -87,7 +87,7 @@ collect_one_file_info(File, Analysis) ->
case dialyzer_utils:get_record_and_type_info(AbstractCode) of
{error, Reason} -> typer:compile_error([Reason]);
{ok, Records} ->
- Mod = list_to_atom(filename:basename(File, ".erl")),
+ Mod = cerl:concrete(cerl:module_name(Core)),
case dialyzer_utils:get_spec_info(Mod, AbstractCode, Records) of
{error, Reason} -> typer:compile_error([Reason]);
{ok, SpecInfo} ->
@@ -100,7 +100,7 @@ collect_one_file_info(File, Analysis) ->
end.
analyze_core_tree(Core, Records, SpecInfo, ExpTypes, Analysis, File) ->
- Module = list_to_atom(filename:basename(File, ".erl")),
+ Module = cerl:concrete(cerl:module_name(Core)),
TmpTree = cerl:from_records(Core),
CS1 = Analysis#typer_analysis.code_server,
NextLabel = dialyzer_codeserver:get_next_core_label(CS1),