diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/NameOps.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/NameOps.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/NameOps.scala b/src/dotty/tools/dotc/core/NameOps.scala index 6b365babb..c9665577d 100644 --- a/src/dotty/tools/dotc/core/NameOps.scala +++ b/src/dotty/tools/dotc/core/NameOps.scala @@ -197,8 +197,10 @@ object NameOps { val p = name.indexOfSlice(TRAIT_SETTER_SEPARATOR) if (p >= 0) (name drop (p + TRAIT_SETTER_SEPARATOR.length)).asTermName.setterToGetter - else + else { + assert(name endsWith SETTER_SUFFIX, name) name.take(name.length - SETTER_SUFFIX.length).asTermName + } } /** Nominally, name$default$N, encoded for <init> */ |