File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
compiler/src/dotty/tools/backend/sjs Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -789,7 +789,21 @@ class JSCodeGen()(using genCtx: Context) {
789789
790790 def isExcluded (m : Symbol ): Boolean = {
791791 def hasAccessBoundary = m.accessBoundary(defn.RootClass ) ne defn.RootClass
792- m.is(Deferred ) || m.isConstructor || hasAccessBoundary || (m.owner eq defn.ObjectClass )
792+
793+ def isOfJLObject : Boolean = m.owner eq defn.ObjectClass
794+
795+ def isDefaultParamOfJSNativeDef : Boolean = {
796+ m.name.is(DefaultGetterName ) && {
797+ val info = new DefaultParamInfo (m)
798+ ! info.isForConstructor && info.attachedMethod.hasAnnotation(jsdefn.JSNativeAnnot )
799+ }
800+ }
801+
802+ m.is(Deferred )
803+ || m.isConstructor
804+ || hasAccessBoundary
805+ || isOfJLObject
806+ || m.hasAnnotation(jsdefn.JSNativeAnnot ) || isDefaultParamOfJSNativeDef // #4557
793807 }
794808
795809 val forwarders = for {
You can’t perform that action at this time.
0 commit comments