Skip to content

Commit 26b195c

Browse files
committed
update scalajs checkfiles
1 parent 22b9275 commit 26b195c

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

compiler/src/dotty/tools/dotc/reporting/messages.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2777,8 +2777,8 @@ extends TypeMsg(NotClassTypeID), ShowMatchTrace(tp):
27772777
def msg(using Context) = i"$tp is not a class type"
27782778
def explain(using Context) =
27792779
i"""A class type includes classes and traits in a specific order. Defining a class, even an anonymous class,
2780-
|requires specifying an order for the traits it extends. For example, `A & B` is not a class type because it
2781-
|doesn't specify which trait takes precedence, A or B. Both `A with B` and `B with A` are class types.
2780+
|requires specifying a linearization order for the traits it extends. For example, `A & B` is not a class type
2781+
|because it doesn't specify which trait takes precedence, A or B. Both the list `A,B` and `B,A` are class types.
27822782
|Class types also can't have refinements."""
27832783

27842784
class NotConstant(suffix: String, tp: Type)(using Context)

tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.check

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,20 @@
2020
14 | val b = js.constructorOf[NativeJSObject.type] // error
2121
| ^^^^^^^^^^^^^^^^^^^
2222
| NativeJSObject.type is not a class type
23+
|
24+
| longer explanation available when compiling with `-explain`
2325
-- [E170] Type Error: tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala:16:27 -----------------------------
2426
16 | val c = js.constructorOf[NativeJSClass with NativeJSTrait] // error
2527
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2628
| NativeJSClass & NativeJSTrait is not a class type
29+
|
30+
| longer explanation available when compiling with `-explain`
2731
-- [E170] Type Error: tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala:17:27 -----------------------------
2832
17 | val d = js.constructorOf[NativeJSClass { def bar: Int }] // error
2933
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3034
| NativeJSClass{def bar: Int} is not a class type
35+
|
36+
| longer explanation available when compiling with `-explain`
3137
-- Error: tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala:19:27 -----------------------------------------
3238
19 | val e = js.constructorOf[JSTrait] // error
3339
| ^^^^^^^
@@ -36,19 +42,29 @@
3642
20 | val f = js.constructorOf[JSObject.type] // error
3743
| ^^^^^^^^^^^^^
3844
| JSObject.type is not a class type
45+
|
46+
| longer explanation available when compiling with `-explain`
3947
-- [E170] Type Error: tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala:22:27 -----------------------------
4048
22 | val g = js.constructorOf[JSClass with JSTrait] // error
4149
| ^^^^^^^^^^^^^^^^^^^^
4250
| JSClass & JSTrait is not a class type
51+
|
52+
| longer explanation available when compiling with `-explain`
4353
-- [E170] Type Error: tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala:23:27 -----------------------------
4454
23 | val h = js.constructorOf[JSClass { def bar: Int }] // error
4555
| ^^^^^^^^^^^^^^^^^^^^^^^^
4656
| JSClass{def bar: Int} is not a class type
57+
|
58+
| longer explanation available when compiling with `-explain`
4759
-- [E170] Type Error: tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala:25:42 -----------------------------
4860
25 | def foo[A <: js.Any] = js.constructorOf[A] // error
4961
| ^
5062
| A is not a class type
63+
|
64+
| longer explanation available when compiling with `-explain`
5165
-- [E170] Type Error: tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala:26:66 -----------------------------
5266
26 | def bar[A <: js.Any: scala.reflect.ClassTag] = js.constructorOf[A] // error
5367
| ^
5468
| A is not a class type
69+
|
70+
| longer explanation available when compiling with `-explain`

tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.check

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,20 @@
2020
14 | val b = js.constructorTag[NativeJSObject.type] // error
2121
| ^
2222
| NativeJSObject.type is not a class type
23+
|
24+
| longer explanation available when compiling with `-explain`
2325
-- [E170] Type Error: tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala:16:61 ----------------------------
2426
16 | val c = js.constructorTag[NativeJSClass with NativeJSTrait] // error
2527
| ^
2628
| NativeJSClass & NativeJSTrait is not a class type
29+
|
30+
| longer explanation available when compiling with `-explain`
2731
-- [E170] Type Error: tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala:17:59 ----------------------------
2832
17 | val d = js.constructorTag[NativeJSClass { def bar: Int }] // error
2933
| ^
3034
| NativeJSClass{def bar: Int} is not a class type
35+
|
36+
| longer explanation available when compiling with `-explain`
3137
-- Error: tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala:19:36 ----------------------------------------
3238
19 | val e = js.constructorTag[JSTrait] // error
3339
| ^
@@ -36,19 +42,29 @@
3642
20 | val f = js.constructorTag[JSObject.type] // error
3743
| ^
3844
| JSObject.type is not a class type
45+
|
46+
| longer explanation available when compiling with `-explain`
3947
-- [E170] Type Error: tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala:22:49 ----------------------------
4048
22 | val g = js.constructorTag[JSClass with JSTrait] // error
4149
| ^
4250
| JSClass & JSTrait is not a class type
51+
|
52+
| longer explanation available when compiling with `-explain`
4353
-- [E170] Type Error: tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala:23:53 ----------------------------
4454
23 | val h = js.constructorTag[JSClass { def bar: Int }] // error
4555
| ^
4656
| JSClass{def bar: Int} is not a class type
57+
|
58+
| longer explanation available when compiling with `-explain`
4759
-- [E170] Type Error: tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala:25:45 ----------------------------
4860
25 | def foo[A <: js.Any] = js.constructorTag[A] // error
4961
| ^
5062
| A is not a class type
63+
|
64+
| longer explanation available when compiling with `-explain`
5165
-- [E170] Type Error: tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala:26:69 ----------------------------
5266
26 | def bar[A <: js.Any: scala.reflect.ClassTag] = js.constructorTag[A] // error
5367
| ^
5468
| A is not a class type
69+
|
70+
| longer explanation available when compiling with `-explain`

0 commit comments

Comments
 (0)