浏览代码

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;
 		| FMemberLocal -> error "Cannot access super inside a local function" p);
 		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
 			ctx.in_super_call <- false;
 			AKExpr (mk (TConst TSuper) t p)