소스 검색

allow super. completion

Nicolas Cannasse 13 년 전
부모
커밋
2950190149
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      typer.ml

+ 4 - 1
typer.ml

@@ -497,7 +497,10 @@ let type_ident ctx i is_type p mode =
 		| FStatic -> error "Cannot access super inside a static function" p;
 		| FStatic -> error "Cannot access super inside a static function" p;
 		| FMemberLocal -> error "Cannot access super inside a local function" p);
 		| FMemberLocal -> error "Cannot access super inside a local function" p);
 		if mode = MSet || not ctx.in_super_call then
 		if mode = MSet || not ctx.in_super_call then
-			AKNo i
+			if mode = MGet && ctx.com.display then
+				AKExpr (mk (TConst TSuper) t p)
+			else
+				AKNo i
 		else begin
 		else begin
 			ctx.in_super_call <- false;
 			ctx.in_super_call <- false;
 			AKExpr (mk (TConst TSuper) t p)
 			AKExpr (mk (TConst TSuper) t p)