diff --git a/tests/neg/i20554-a.check b/tests/neg/i20554-a.check index b223cba32f77..ac0890ba133a 100644 --- a/tests/neg/i20554-a.check +++ b/tests/neg/i20554-a.check @@ -7,8 +7,8 @@ | Explanation (enabled by `-explain`) |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Starting from Scala 3.6.0, named arguments are required for Java defined annotations. - | Java defined annotations don't have an exact constructor representation - | and we previously relied on the order of the fields to create one. + | Java defined annotations don't have an exact constructor representation + | and we previously relied on the order of the fields to create one. | One possible issue with this representation is the reordering of the fields. | Lets take the following example: | @@ -29,8 +29,8 @@ | Explanation (enabled by `-explain`) |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Starting from Scala 3.6.0, named arguments are required for Java defined annotations. - | Java defined annotations don't have an exact constructor representation - | and we previously relied on the order of the fields to create one. + | Java defined annotations don't have an exact constructor representation + | and we previously relied on the order of the fields to create one. | One possible issue with this representation is the reordering of the fields. | Lets take the following example: | diff --git a/tests/neg/i20554-b.check b/tests/neg/i20554-b.check index 5e5119e043fe..637b48ee93ef 100644 --- a/tests/neg/i20554-b.check +++ b/tests/neg/i20554-b.check @@ -7,8 +7,8 @@ | Explanation (enabled by `-explain`) |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Starting from Scala 3.6.0, named arguments are required for Java defined annotations. - | Java defined annotations don't have an exact constructor representation - | and we previously relied on the order of the fields to create one. + | Java defined annotations don't have an exact constructor representation + | and we previously relied on the order of the fields to create one. | One possible issue with this representation is the reordering of the fields. | Lets take the following example: | diff --git a/tests/neg/i21543.check b/tests/neg/i21543.check new file mode 100644 index 000000000000..9fa9a7779d7a --- /dev/null +++ b/tests/neg/i21543.check @@ -0,0 +1,22 @@ +-- [E007] Type Mismatch Error: tests/neg/i21543.scala:10:15 ------------------------------------------------------------ +10 | Cmd(List("1", "2")) // error // error + | ^^^ + | Found: ("1" : String) + | Required: Event + | + | Note that I could not resolve reference Event. + | Event is a private member in a base class + | + | + | longer explanation available when compiling with `-explain` +-- [E007] Type Mismatch Error: tests/neg/i21543.scala:10:20 ------------------------------------------------------------ +10 | Cmd(List("1", "2")) // error // error + | ^^^ + | Found: ("2" : String) + | Required: Event + | + | Note that I could not resolve reference Event. + | Event is a private member in a base class + | + | + | longer explanation available when compiling with `-explain` diff --git a/tests/neg/i21543.scala b/tests/neg/i21543.scala index 98de8d3ec939..aaadce6d22b4 100644 --- a/tests/neg/i21543.scala +++ b/tests/neg/i21543.scala @@ -7,7 +7,7 @@ object CompilerCrash { new Scope { val commands = List( - Cmd(List("1", "2")) + Cmd(List("1", "2")) // error // error ) } } \ No newline at end of file