Skip to content

Commit 46a29f1

Browse files
committed
Fix #7329: Fix assertions
1 parent f168498 commit 46a29f1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

compiler/src/dotty/tools/dotc/tastyreflect/ReflectionCompilerInterface.scala

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,15 +1458,11 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
14581458

14591459
def Symbol_flags(self: Symbol)(given Context): Flags = self.flags
14601460

1461-
def Symbol_tree(self: Symbol)(given Context): Tree = {
1462-
assert(!self.is(Case, butNot = Enum | Module))
1461+
def Symbol_tree(self: Symbol)(given Context): Tree =
14631462
FromSymbol.definitionFromSym(self)
1464-
}
14651463

1466-
def Symbol_pattern(self: Symbol)(given ctx: Context): Pattern = {
1467-
assert(self.is(Case, butNot = Enum | Module))
1464+
def Symbol_pattern(self: Symbol)(given ctx: Context): Pattern =
14681465
FromSymbol.definitionFromSym(self)
1469-
}
14701466

14711467
def Symbol_privateWithin(self: Symbol)(given Context): Option[Type] = {
14721468
val within = self.privateWithin
@@ -1585,7 +1581,7 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
15851581
symbol.is(core.Flags.Method)
15861582

15871583
def Symbol_isBind(symbol: Symbol)(given Context): Boolean =
1588-
symbol.is(core.Flags.Case, butNot = Enum | Module) && !symbol.isClass
1584+
symbol.is(core.Flags.Case, , butNot = Enum | Module) && !symbol.isClass
15891585

15901586
def Symbol_signature(self: Symbol)(given Context): Signature =
15911587
self.signature

0 commit comments

Comments
 (0)