From db93321ce0431d4e8cea722fdb083456065d08b9 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Sun, 29 Sep 2019 19:28:21 +0200 Subject: [PATCH] Fix #7329: Fix assertions --- .../dotc/tastyreflect/ReflectionCompilerInterface.scala | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/tastyreflect/ReflectionCompilerInterface.scala b/compiler/src/dotty/tools/dotc/tastyreflect/ReflectionCompilerInterface.scala index d9c3966fcd09..ced02ce30139 100644 --- a/compiler/src/dotty/tools/dotc/tastyreflect/ReflectionCompilerInterface.scala +++ b/compiler/src/dotty/tools/dotc/tastyreflect/ReflectionCompilerInterface.scala @@ -1458,15 +1458,11 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend def Symbol_flags(self: Symbol)(given Context): Flags = self.flags - def Symbol_tree(self: Symbol)(given Context): Tree = { - assert(!self.is(Case, butNot = Enum | Module)) + def Symbol_tree(self: Symbol)(given Context): Tree = FromSymbol.definitionFromSym(self) - } - def Symbol_pattern(self: Symbol)(given ctx: Context): Pattern = { - assert(self.is(Case, butNot = Enum | Module)) + def Symbol_pattern(self: Symbol)(given ctx: Context): Pattern = FromSymbol.definitionFromSym(self) - } def Symbol_privateWithin(self: Symbol)(given Context): Option[Type] = { val within = self.privateWithin