Skip to content

Commit a9b9078

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,12 +1459,12 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
14591459
def Symbol_flags(self: Symbol)(given Context): Flags = self.flags
14601460

14611461
def Symbol_tree(self: Symbol)(given Context): Tree = {
1462-
assert(!self.is(Case, butNot = Enum | Module))
1462+
assert(!self.is(Case) || self.isClass)
14631463
FromSymbol.definitionFromSym(self)
14641464
}
14651465

14661466
def Symbol_pattern(self: Symbol)(given ctx: Context): Pattern = {
1467-
assert(self.is(Case, butNot = Enum | Module))
1467+
assert(self.is(Case) && !self.isClass)
14681468
FromSymbol.definitionFromSym(self)
14691469
}
14701470

@@ -1585,7 +1585,7 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
15851585
symbol.is(core.Flags.Method)
15861586

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

15901590
def Symbol_signature(self: Symbol)(given Context): Signature =
15911591
self.signature

0 commit comments

Comments
 (0)