JS frontend: remove diagnostics about the secondary constructors are not supported
This commit is contained in:
-1
@@ -37,7 +37,6 @@ private val DIAGNOSTIC_FACTORY_TO_RENDERER by Delegates.lazy {
|
||||
put(ErrorsJs.NOT_SUPPORTED, "Cannot translate (not supported yet): ''{0}''", RenderFirstLineOfElementText)
|
||||
put(ErrorsJs.REFERENCE_TO_BUILTIN_MEMBERS_NOT_SUPPORTED, "Callable references for builtin members are not supported yet: ''{0}''", RenderFirstLineOfElementText)
|
||||
put(ErrorsJs.NON_TOPLEVEL_CLASS_DECLARATION, "Non-toplevel {0} declarations not supported yet", Renderers.STRING)
|
||||
put(ErrorsJs.SECONDARY_CONSTRUCTOR, "Secondary constructors not supported yet")
|
||||
put(ErrorsJs.JSCODE_NO_JAVASCRIPT_PRODUCED, "Argument must be non-empty JavaScript code")
|
||||
|
||||
this
|
||||
|
||||
@@ -43,7 +43,6 @@ public interface ErrorsJs {
|
||||
DiagnosticFactory1<JetElement, JetElement> NOT_SUPPORTED = DiagnosticFactory1.create(ERROR, DEFAULT);
|
||||
DiagnosticFactory1<JetElement, JetElement> REFERENCE_TO_BUILTIN_MEMBERS_NOT_SUPPORTED = DiagnosticFactory1.create(ERROR, DEFAULT);
|
||||
DiagnosticFactory1<JetNamedDeclaration, String> NON_TOPLEVEL_CLASS_DECLARATION = DiagnosticFactory1.create(ERROR, DECLARATION_NAME);
|
||||
DiagnosticFactory0<JetNamedDeclaration> SECONDARY_CONSTRUCTOR = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
|
||||
DiagnosticFactory0<JetExpression> JSCODE_NO_JAVASCRIPT_PRODUCED = DiagnosticFactory0.create(ERROR, DEFAULT);
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
|
||||
@@ -34,12 +34,6 @@ class ClassDeclarationChecker : DeclarationChecker {
|
||||
|
||||
if (declaration !is JetClassOrObject || declaration is JetObjectDeclaration || declaration is JetEnumEntry) return
|
||||
|
||||
if (declaration is JetClass) {
|
||||
declaration.getSecondaryConstructors().forEach {
|
||||
diagnosticHolder.report(ErrorsJs.SECONDARY_CONSTRUCTOR.on(it))
|
||||
}
|
||||
}
|
||||
|
||||
// hack to avoid to get diagnostics when compile kotlin builtins
|
||||
val fqNameUnsafe = DescriptorUtils.getFqName(descriptor)
|
||||
if (fqNameUnsafe.asString().startsWith("kotlin.")) return
|
||||
|
||||
Reference in New Issue
Block a user