File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,9 @@ object Decorators {
274
274
s " [cannot display due to $msg, raw string = $x] "
275
275
case _ => String .valueOf(x).nn
276
276
277
+ /** Returns the simple class name of `x`. */
278
+ def className : String = getClass.getSimpleName.nn
279
+
277
280
extension [T ](x : T )
278
281
def assertingErrorsReported (using Context ): T = {
279
282
assert(ctx.reporter.errorsReported)
Original file line number Diff line number Diff line change @@ -1906,14 +1906,6 @@ object Types {
1906
1906
case _ => show
1907
1907
}
1908
1908
1909
- /** Returns the shortened and slightly prettified name of the class of the type. */
1910
- def className : String =
1911
- def go (s : String ): String =
1912
- import Predef .augmentString // "import Texts._" imports the conversion to Text, which has a stripPrefix
1913
- val s2 = s.stripPrefix(" Cached" ).stripPrefix(" Real" ).stripSuffix(" Impl" ).stripSuffix(" $" )
1914
- if s == s2 then s2 else go(s2)
1915
- go(getClass.getSimpleName.nn)
1916
-
1917
1909
/** A simplified version of this type which is equivalent wrt =:= to this type.
1918
1910
* This applies a typemap to the type which (as all typemaps) follows type
1919
1911
* variable instances and reduces typerefs over refined types. It also
You can’t perform that action at this time.
0 commit comments