File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
compiler/src/dotty/tools/dotc/transform/sjs Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -99,17 +99,13 @@ object JSSymUtils {
9999 def isJSDefaultParam (using Context ): Boolean = {
100100 sym.name.is(DefaultGetterName ) && {
101101 val owner = sym.owner
102- if (owner.is(ModuleClass )) {
103- val isConstructor = sym.name match {
104- case DefaultGetterName (methName, _) => methName == nme.CONSTRUCTOR
105- case _ => false
106- }
107- if (isConstructor)
108- owner.linkedClass.isJSType
109- else
110- owner.isJSType
102+ val methName = sym.name.exclude(DefaultGetterName )
103+ if (methName == nme.CONSTRUCTOR ) {
104+ owner.linkedClass.isJSType
111105 } else {
112- owner.isJSType
106+ def isAttachedMethodExposed : Boolean =
107+ owner.info.decl(methName).hasAltWith(_.symbol.isJSExposed)
108+ owner.isJSType && (! owner.isNonNativeJSClass || isAttachedMethodExposed)
113109 }
114110 }
115111 }
You can’t perform that action at this time.
0 commit comments