@@ -1553,7 +1553,7 @@ class JSCodeGen()(using genCtx: Context) {
15531553 assert(ctor.isClassConstructor,
15541554 " 'new' call to non-constructor: " + ctor.name)
15551555
1556- val clsSym = tpe.widenDealias. typeSymbol
1556+ val clsSym = tpe.typeSymbol
15571557
15581558 if (isHijackedClass(clsSym)) {
15591559 genNewHijackedClass(clsSym, ctor, args.map(genExpr))
@@ -1922,8 +1922,8 @@ class JSCodeGen()(using genCtx: Context) {
19221922 private def genEqEqPrimitive (ltpe : Type , rtpe : Type , lsrc : js.Tree , rsrc : js.Tree )(
19231923 implicit pos : SourcePosition ): js.Tree = {
19241924 report.debuglog(s " $ltpe == $rtpe" )
1925- val lsym = ltpe.widenDealias. typeSymbol.asClass
1926- val rsym = rtpe.widenDealias. typeSymbol.asClass
1925+ val lsym = ltpe.typeSymbol.asClass
1926+ val rsym = rtpe.typeSymbol.asClass
19271927
19281928 /* True if the equality comparison is between values that require the
19291929 * use of the rich equality comparator
@@ -2098,7 +2098,7 @@ class JSCodeGen()(using genCtx: Context) {
20982098 val exception = args.head
20992099 val genException = genExpr(exception)
21002100 js.Throw {
2101- if (exception.tpe.widenDealias. typeSymbol.derivesFrom(jsdefn.JavaScriptExceptionClass )) {
2101+ if (exception.tpe.typeSymbol.derivesFrom(jsdefn.JavaScriptExceptionClass )) {
21022102 genModuleApplyMethod(
21032103 jsdefn.Runtime_unwrapJavaScriptException ,
21042104 List (genException))
@@ -2594,7 +2594,7 @@ class JSCodeGen()(using genCtx: Context) {
25942594 box(call, sym.info.finalResultType)
25952595 }
25962596
2597- val funInterfaceSym = functionalInterface.tpe.widenDealias. typeSymbol
2597+ val funInterfaceSym = functionalInterface.tpe.typeSymbol
25982598
25992599 if (jsdefn.isJSThisFunctionClass(funInterfaceSym)) {
26002600 val thisParam :: otherParams = formalParams
@@ -2688,7 +2688,7 @@ class JSCodeGen()(using genCtx: Context) {
26882688 private def genAsInstanceOf (value : js.Tree , to : Type )(
26892689 implicit pos : Position ): js.Tree = {
26902690
2691- val sym = to.widenDealias. typeSymbol
2691+ val sym = to.typeSymbol
26922692
26932693 if (sym == defn.ObjectClass || isJSType(sym)) {
26942694 /* asInstanceOf[Object] always succeeds, and
@@ -2716,7 +2716,7 @@ class JSCodeGen()(using genCtx: Context) {
27162716 /** Gen JS code for an isInstanceOf test (for reference types only) */
27172717 private def genIsInstanceOf (value : js.Tree , to : Type )(
27182718 implicit pos : SourcePosition ): js.Tree = {
2719- val sym = to.widenDealias. typeSymbol
2719+ val sym = to.typeSymbol
27202720
27212721 if (sym == defn.ObjectClass ) {
27222722 js.BinaryOp (js.BinaryOp .!== , value, js.Null ())
0 commit comments