@@ -1553,7 +1553,7 @@ class JSCodeGen()(using genCtx: Context) {
1553
1553
assert(ctor.isClassConstructor,
1554
1554
" 'new' call to non-constructor: " + ctor.name)
1555
1555
1556
- val clsSym = tpe.widenDealias. typeSymbol
1556
+ val clsSym = tpe.typeSymbol
1557
1557
1558
1558
if (isHijackedClass(clsSym)) {
1559
1559
genNewHijackedClass(clsSym, ctor, args.map(genExpr))
@@ -1922,8 +1922,8 @@ class JSCodeGen()(using genCtx: Context) {
1922
1922
private def genEqEqPrimitive (ltpe : Type , rtpe : Type , lsrc : js.Tree , rsrc : js.Tree )(
1923
1923
implicit pos : SourcePosition ): js.Tree = {
1924
1924
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
1927
1927
1928
1928
/* True if the equality comparison is between values that require the
1929
1929
* use of the rich equality comparator
@@ -2098,7 +2098,7 @@ class JSCodeGen()(using genCtx: Context) {
2098
2098
val exception = args.head
2099
2099
val genException = genExpr(exception)
2100
2100
js.Throw {
2101
- if (exception.tpe.widenDealias. typeSymbol.derivesFrom(jsdefn.JavaScriptExceptionClass )) {
2101
+ if (exception.tpe.typeSymbol.derivesFrom(jsdefn.JavaScriptExceptionClass )) {
2102
2102
genModuleApplyMethod(
2103
2103
jsdefn.Runtime_unwrapJavaScriptException ,
2104
2104
List (genException))
@@ -2594,7 +2594,7 @@ class JSCodeGen()(using genCtx: Context) {
2594
2594
box(call, sym.info.finalResultType)
2595
2595
}
2596
2596
2597
- val funInterfaceSym = functionalInterface.tpe.widenDealias. typeSymbol
2597
+ val funInterfaceSym = functionalInterface.tpe.typeSymbol
2598
2598
2599
2599
if (jsdefn.isJSThisFunctionClass(funInterfaceSym)) {
2600
2600
val thisParam :: otherParams = formalParams
@@ -2688,7 +2688,7 @@ class JSCodeGen()(using genCtx: Context) {
2688
2688
private def genAsInstanceOf (value : js.Tree , to : Type )(
2689
2689
implicit pos : Position ): js.Tree = {
2690
2690
2691
- val sym = to.widenDealias. typeSymbol
2691
+ val sym = to.typeSymbol
2692
2692
2693
2693
if (sym == defn.ObjectClass || isJSType(sym)) {
2694
2694
/* asInstanceOf[Object] always succeeds, and
@@ -2716,7 +2716,7 @@ class JSCodeGen()(using genCtx: Context) {
2716
2716
/** Gen JS code for an isInstanceOf test (for reference types only) */
2717
2717
private def genIsInstanceOf (value : js.Tree , to : Type )(
2718
2718
implicit pos : SourcePosition ): js.Tree = {
2719
- val sym = to.widenDealias. typeSymbol
2719
+ val sym = to.typeSymbol
2720
2720
2721
2721
if (sym == defn.ObjectClass ) {
2722
2722
js.BinaryOp (js.BinaryOp .!== , value, js.Null ())
0 commit comments