From 6cb611a11390ae11961df6f527a8e73413862425 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 22 Sep 2020 14:52:48 +0900 Subject: [PATCH] Add info about scala -Yrepl-class-based:false flag to reflection/overview.md --- _overviews/reflection/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_overviews/reflection/overview.md b/_overviews/reflection/overview.md index 08dd5dcc58..2a8cbae7e8 100644 --- a/_overviews/reflection/overview.md +++ b/_overviews/reflection/overview.md @@ -130,7 +130,7 @@ available that are loaded by the current classloader, including class The second step involves obtaining a `ClassMirror` for class `Person` using the `reflectClass` method. The `ClassMirror` provides access to the -constructor of class `Person`. +constructor of class `Person`. (If this step causes an exception, the easy workaround is to use these flags when starting REPL. `scala -Yrepl-class-based:false`) scala> val ctor = ru.typeOf[Person].decl(ru.termNames.CONSTRUCTOR).asMethod ctor: scala.reflect.runtime.universe.MethodSymbol = constructor Person