aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Checking.scala
diff options
context:
space:
mode:
authorNicolas Stucki <nicolas.stucki@gmail.com>2017-03-01 22:51:00 +0100
committerNicolas Stucki <nicolas.stucki@gmail.com>2017-03-01 22:51:00 +0100
commit8d801e9edc384c0ef899046aff61730a524aa85d (patch)
tree91a6afbda2555988ce376a421bbaa810c447695e /compiler/src/dotty/tools/dotc/typer/Checking.scala
parentfeaa0aeb691b24a407ccc9f371e7a1ae6545b33c (diff)
downloaddotty-8d801e9edc384c0ef899046aff61730a524aa85d.tar.gz
dotty-8d801e9edc384c0ef899046aff61730a524aa85d.tar.bz2
dotty-8d801e9edc384c0ef899046aff61730a524aa85d.zip
Allow abstract type members in objects.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Checking.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Checking.scala2
1 files changed, 1 insertions, 1 deletions
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)