File tree Expand file tree Collapse file tree 2 files changed +26
-5
lines changed
compiler/src/dotty/tools/dotc/transform/sjs
tests/sjs-junit/test/org/scalajs/testsuite/compiler Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,8 @@ object JSSymUtils {
4343
4444 extension (sym : Symbol ) {
4545 /** Is this symbol a JavaScript type? */
46- def isJSType (using Context ): Boolean = {
47- atPhase(erasurePhase) {
48- sym.derivesFrom(jsdefn.JSAnyClass ) || sym == jsdefn.PseudoUnionClass
49- }
50- }
46+ def isJSType (using Context ): Boolean =
47+ sym.hasAnnotation(jsdefn.JSTypeAnnot )
5148
5249 /** Is this symbol a non-native JS class? */
5350 def isNonNativeJSClass (using Context ): Boolean =
Original file line number Diff line number Diff line change 1+ package org .scalajs .testsuite .compiler
2+
3+ import org .junit .Assert ._
4+ import org .junit .Test
5+
6+ class RegressionTestScala3 {
7+ import RegressionTestScala3 ._
8+
9+ @ Test def testRegressionDoubleDefinitionOfOuterPointerIssue10177 (): Unit = {
10+ assertEquals(6 , new OuterClassIssue10177 ().foo(5 ))
11+ }
12+ }
13+
14+ object RegressionTestScala3 {
15+ class OuterClassIssue10177 { // can also be trait
16+ trait ParentTrait { // must be trait, can be private
17+ def concreteMethod (x : Int ): Int = x + 1 // must have a concrete method
18+ }
19+
20+ private class ChildClass extends ParentTrait // must be class *and* private
21+
22+ def foo (x : Int ): Int = new ChildClass ().concreteMethod(x)
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments