Skip to content

Commit fdec229

Browse files
committed
---
yaml --- r: 880 b: refs/heads/master c: a58016d h: refs/heads/master v: v3
1 parent 9117887 commit fdec229

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 1d214b4df3013a53e50d778fa921ed99bc498d02
2+
refs/heads/master: a58016d43e85721d50ff2a387ddab5bab0a1c13e

trunk/src/boot/me/semant.ml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,16 @@ let rec project_ident_from_items
20012001

20022002
let lchk =
20032003
if List.mem (scope_id, ident) lchk
2004-
then err (Some scope_id) "cyclic import for ident %s" ident
2004+
then
2005+
let string_of_loop_check (id, ident) =
2006+
match Session.get_span cx.ctxt_sess id with
2007+
Some span -> ident ^ " @ " ^ (Session.string_of_span span)
2008+
| None -> ident
2009+
in
2010+
let lchk' = (scope_id, ident)::lchk in
2011+
let lchk_strs = List.map string_of_loop_check (List.rev lchk') in
2012+
err (Some scope_id) "cyclic import for ident %s (%s)" ident
2013+
(String.concat " -> " lchk_strs)
20052014
else (scope_id, ident)::lchk
20062015
in
20072016

0 commit comments

Comments
 (0)