aboutsummaryrefslogtreecommitdiff
path: root/compiler/src
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-03-03 13:45:53 +0100
committerGitHub <noreply@github.com>2017-03-03 13:45:53 +0100
commit917a7edad284b180dff917341dd0f800d430291f (patch)
tree91a6afbda2555988ce376a421bbaa810c447695e /compiler/src
parentfeaa0aeb691b24a407ccc9f371e7a1ae6545b33c (diff)
parent8d801e9edc384c0ef899046aff61730a524aa85d (diff)
downloaddotty-917a7edad284b180dff917341dd0f800d430291f.tar.gz
dotty-917a7edad284b180dff917341dd0f800d430291f.tar.bz2
dotty-917a7edad284b180dff917341dd0f800d430291f.zip
Merge pull request #2044 from dotty-staging/abstract-type-in-object
Allow abstract type members in objects.
Diffstat (limited to 'compiler/src')
-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)