فهرست منبع

important 2.10 fix : completion was broken due to $ locals being generated by completion optimizer

Nicolas Cannasse 13 سال پیش
والد
کامیت
a1c356cc45
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -1797,7 +1797,7 @@ and type_expr ctx ?(need_val=true) (e,p) =
 						unify ctx e.etype t p;
 						Some e
 				) in
-				if v.[0] = '$' then error "Variables names starting with a dollar are not allowed" p;
+				if v.[0] = '$' && not ctx.com.display then error "Variables names starting with a dollar are not allowed" p;
 				add_local ctx v t, e
 			with
 				Error (e,p) ->