From 8d801e9edc384c0ef899046aff61730a524aa85d Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Wed, 1 Mar 2017 22:51:00 +0100 Subject: Allow abstract type members in objects. --- compiler/src/dotty/tools/dotc/typer/Checking.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/typer/Checking.scala') diff --git a/compiler/src/dotty/tools/dotc/typer/Checking.scala b/compiler/src/dotty/tools/dotc/typer/Checking.scala index 48f9243f7..1ca7eb107 100644 --- a/compiler/src/dotty/tools/dotc/typer/Checking.scala +++ b/compiler/src/dotty/tools/dotc/typer/Checking.scala @@ -327,7 +327,7 @@ object Checking { if (!sym.is(Deferred)) fail(i"`@native' members may not have implementation") } - else if (sym.is(Deferred, butNot = Param) && !sym.isSelfSym) { + else if (sym.is(Deferred, butNot = Param) && !sym.isType && !sym.isSelfSym) { if (!sym.owner.isClass || sym.owner.is(Module) || sym.owner.isAnonymousClass) fail(i"only classes can have declared but undefined members$varNote") checkWithDeferred(Private) -- cgit v1.2.3