Skip to content

Commit 6e917f7

Browse files
authored
Merge pull request #3290 from dotty-staging/hot-assert-closure
Avoid closure creation in hot code
2 parents a116bd0 + 1e88c3a commit 6e917f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/core/Flags.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ object Flags {
2222
else if (that.bits == 0) this
2323
else {
2424
val tbits = bits & that.bits & KINDFLAGS
25-
assert(tbits != 0, s"illegal flagset combination: $this and $that")
25+
if (tbits == 0)
26+
assert(false, s"illegal flagset combination: $this and $that")
2627
FlagSet(tbits | ((this.bits | that.bits) & ~KINDFLAGS))
2728
}
2829

0 commit comments

Comments
 (0)