mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
Ignore non-singleton subtypes of ErrorCode when creating error code documentation. (#14829)
CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
fe703c6c67
commit
7728d61565
@ -3,8 +3,6 @@
|
||||
|
||||
package com.daml.error.generator
|
||||
|
||||
import java.lang.reflect.Modifier
|
||||
|
||||
import com.daml.error._
|
||||
import org.reflections.Reflections
|
||||
|
||||
@ -188,10 +186,8 @@ object ErrorCodeDocumentationGenerator {
|
||||
.getSubTypesOf(runtimeMirror.runtimeClass(ru.typeOf[T]))
|
||||
.asScala
|
||||
.view
|
||||
.collect {
|
||||
case clazz if !Modifier.isAbstract(clazz.getModifiers) =>
|
||||
clazz.getDeclaredField("MODULE$").get(clazz).asInstanceOf[T]
|
||||
}
|
||||
.filter(_.getDeclaredFields.exists(_.getName == "MODULE$"))
|
||||
.map { clazz => clazz.getDeclaredField("MODULE$").get(clazz).asInstanceOf[T] }
|
||||
.toSeq
|
||||
|
||||
private def simpleClassName(any: Any): String =
|
||||
|
Loading…
Reference in New Issue
Block a user