diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-03-08 13:53:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-08 13:53:55 +0100 |
commit | c84480960cf618c29705dbaab9332d304a081524 (patch) | |
tree | 5e0eaa03bb816ab2c7fa21897f5caf201005f88d /compiler/src/dotty/tools/dotc/ast | |
parent | 3c4d29eabaa71c30ccc2c7b62517d771d6f9d8f5 (diff) | |
parent | a2b3bc17271a59f4d0f690fd46f3328c55ab06cb (diff) | |
download | dotty-c84480960cf618c29705dbaab9332d304a081524.tar.gz dotty-c84480960cf618c29705dbaab9332d304a081524.tar.bz2 dotty-c84480960cf618c29705dbaab9332d304a081524.zip |
Merge pull request #2062 from dotty-staging/fix/scala-reflect-dep
Remove most uses of scala-reflect jar
Diffstat (limited to 'compiler/src/dotty/tools/dotc/ast')
-rw-r--r-- | compiler/src/dotty/tools/dotc/ast/TreeInfo.scala | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala index e48b1039b..dd890dc50 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -31,11 +31,16 @@ trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] => * Does tree contain an initialization part when seen as a member of a class or trait? */ def defKind(tree: Tree): FlagSet = unsplice(tree) match { - case EmptyTree | _: Import => NoInitsInterface - case tree: TypeDef => if (tree.isClassDef) NoInits else NoInitsInterface - case tree: DefDef => if (tree.unforcedRhs == EmptyTree) NoInitsInterface else NoInits - case tree: ValDef => if (tree.unforcedRhs == EmptyTree) NoInitsInterface else EmptyFlags - case _ => EmptyFlags + case EmptyTree | _: Import => + NoInitsInterface + case tree: TypeDef => + if (tree.isClassDef) NoInits else NoInitsInterface + case tree: DefDef => + if (tree.unforcedRhs == EmptyTree && tree.vparamss.forall(_.forall(_.unforcedRhs == EmptyTree))) NoInitsInterface else NoInits + case tree: ValDef => + if (tree.unforcedRhs == EmptyTree) NoInitsInterface else EmptyFlags + case _ => + EmptyFlags } def isOpAssign(tree: Tree) = unsplice(tree) match { |