diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-25 07:58:47 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-25 07:58:47 -0800 |
commit | 5e2821caef2f49185338c01a7cb8a4e5e0155b7a (patch) | |
tree | e0c5425170ad5a083bc4e780182ee6c23aed3a36 /src | |
parent | 417304514b664e5f66bfc06fb2b0e86b99d23a63 (diff) | |
parent | 8a74b7bd136f691d9d60c7dd10ddf96a45e32329 (diff) | |
download | scala-5e2821caef2f49185338c01a7cb8a4e5e0155b7a.tar.gz scala-5e2821caef2f49185338c01a7cb8a4e5e0155b7a.tar.bz2 scala-5e2821caef2f49185338c01a7cb8a4e5e0155b7a.zip |
Merge pull request #1907 from namin/si-6952
Closes SI-6952: add correct error positions for Dynamic feature check.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 5ad6c6bd73..553583e6b7 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1748,8 +1748,8 @@ trait Typers extends Modes with Adaptations with Tags { */ def validateParentClasses(parents: List[Tree], selfType: Type) { val pending = ListBuffer[AbsTypeError]() - def validateDynamicParent(parent: Symbol) = - if (parent == DynamicClass) checkFeature(parent.pos, DynamicsFeature) + def validateDynamicParent(parent: Symbol, parentPos: Position) = + if (parent == DynamicClass) checkFeature(parentPos, DynamicsFeature) def validateParentClass(parent: Tree, superclazz: Symbol) = if (!parent.isErrorTyped) { @@ -1799,7 +1799,7 @@ trait Typers extends Modes with Adaptations with Tags { if (parents exists (p => p != parent && p.tpe.typeSymbol == psym && !psym.isError)) pending += ParentInheritedTwiceError(parent, psym) - validateDynamicParent(psym) + validateDynamicParent(psym, parent.pos) } if (!parents.isEmpty && parents.forall(!_.isErrorTyped)) { |