Commit Graph

47 Commits

Author SHA1 Message Date
Ian Lynagh
6224670884 Kotlin: Accept 2.0.0's Kotlin 2 test output 2024-06-03 15:26:51 +01:00
Ian Lynagh
e610573411 Merge pull request #16078 from igfoo/igfoo/exprs_changes
Kotlin 2: Accept more changes
2024-04-02 12:19:17 +01:00
Ian Lynagh
3acdc73f22 Kotlin 2: Accept some more location changes 2024-03-28 16:15:37 +00:00
Ian Lynagh
568fba6940 Kotlin 2: Accept some more test changes 2024-03-28 15:28:36 +00:00
Ian Lynagh
0fdc71bf57 Kotlin 2: Accept a test change
For

    if(r != null) {
        val r2: Rectangle = r

in Kotlin 2 mode, there is no IMPLICIT_NOTNULL check in Kotlin 2 mode:

    then: BLOCK type=kotlin.Unit origin=null
      VAR name:r2 type:java.awt.Rectangle [val]
-       TYPE_OP type=java.awt.Rectangle origin=IMPLICIT_NOTNULL typeOperand=java.awt.Rectangle
-         GET_VAR 'val r: @[FlexibleNullability] java.awt.Rectangle? [val] declared in <root>.foo' type=@[FlexibleNullability] java.awt.Rectangle? origin=null
+       GET_VAR 'val r: @[FlexibleNullability] java.awt.Rectangle? [val] declared in <root>.foo' type=@[FlexibleNullability] java.awt.Rectangle? origin=null
      VAR name:height type:kotlin.Int [val]
        GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:height type:kotlin.Int visibility:public' type=kotlin.Int origin=null
          receiver: GET_VAR 'val r2: java.awt.Rectangle [val] declared in <root>.foo' type=java.awt.Rectangle origin=null
2024-03-28 15:23:27 +00:00
Ian Lynagh
96723b1a8f Kotlin 2: Accept some loc changes 2024-03-28 15:11:19 +00:00
Ian Lynagh
24c4c3e068 Kotlin 2: Accept a test change
With:

    open class Root {}
    class Subclass1: Root() {}

    fun typeTests(x: Root, y: Subclass1) {
        val y1: Subclass1 = if (x is Subclass1) { x } else { y }
    }

we now get a slightly different AST, which means we no longer need to
insert a StmtExpr:

     BRANCH
       if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.Subclass1
         GET_VAR 'x: <root>.Root declared in <root>.typeTests' type=<root>.Root origin=null
-      then: TYPE_OP type=<root>.Subclass1 origin=IMPLICIT_CAST typeOperand=<root>.Subclass1
-        BLOCK type=<root>.Root origin=null
+      then: BLOCK type=<root>.Subclass1 origin=null
+        TYPE_OP type=<root>.Subclass1 origin=IMPLICIT_CAST typeOperand=<root>.Subclass1
           GET_VAR 'x: <root>.Root declared in <root>.typeTests' type=<root>.Root origin=null
2024-03-28 15:07:30 +00:00
Ian Lynagh
c5604c97bd Kotlin 2: Accept more location changes 2024-03-26 14:10:28 +00:00
Ian Lynagh
63e34c4dec Kotlin 2: Accept more location changes 2024-03-22 14:09:20 +00:00
Ian Lynagh
3fa7532b43 Kotlin 2: Accept more test changes 2024-03-20 11:46:58 +00:00
Ian Lynagh
a53d5d832d Kotlin 2: Accept more loc changes 2024-03-15 18:08:53 +00:00
Ian Lynagh
c4c843968e Kotlin 2: Accept more loc changes 2024-03-15 18:07:39 +00:00
Ian Lynagh
57d17d85f2 Kotlin 2: Accept more loc changes 2024-03-15 18:07:12 +00:00
Ian Lynagh
6c0885c24d Kotlin 2: Accept more loc changes 2024-03-15 18:06:45 +00:00
Ian Lynagh
5580daf60e Kotlin 2: Accept more loc changes 2024-03-15 18:06:13 +00:00
Ian Lynagh
1d2b31f0be Kotlin 2: Accept more loc changes 2024-03-15 18:05:46 +00:00
Ian Lynagh
5552fe3c34 Kotlin 2: Accept more loc changes 2024-03-15 18:05:09 +00:00
Ian Lynagh
28f98d0344 Kotlin 2: Accept more location changes 2024-03-15 18:04:28 +00:00
Ian Lynagh
354cdf44aa Kotlin 2: Accept more location changes 2024-03-15 18:03:55 +00:00
Ian Lynagh
f4542f6160 Kotlin2 : Accept some more location changes 2024-03-15 18:02:54 +00:00
Ian Lynagh
0e94aa0eb5 Kotlin 2: Accept more changes in the exprs test 2024-03-12 16:42:37 +00:00
Ian Lynagh
e74606eba3 Kotlin 2: Accept some more loc changes 2024-03-07 18:40:59 +00:00
Ian Lynagh
79c5ad93b0 Kotlin 2: Accept a loc change
This is a bit of an odd location for the IrVariableImpl as it includes a
comment, but the comment is already included in the corrresponding
IrLocalDelegatedPropertyImpl so it's not clearly wrong:

 Element: 16 59 (2:4 - 2:47) class org.jetbrains.kotlin.ir.declarations.impl.IrLocalDelegatedPropertyImpl
-Element: 29 42 (2:17 - 2:30) class org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl
+Element: 16 59 (2:4 - 2:47) class org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl

So just accept the change.
2024-03-07 18:37:00 +00:00
Ian Lynagh
e58b6e86b2 Kotlin 2: Accept more loc changes in exprs test 2024-03-06 17:57:44 +00:00
Ian Lynagh
6e09dcc16a Kotlin 2: Accept more loc changes in exprs 2024-03-04 19:06:32 +00:00
Ian Lynagh
22e6c676c3 Kotlin 2: Accept loc change for a string literal in expr test 2024-03-04 19:02:40 +00:00
Ian Lynagh
b7d2e54bbd Kotlin 2: exprs test: Accept loc change for ClassWithDelegate 2024-03-04 19:00:40 +00:00
Ian Lynagh
00ab1a3129 Kotlin 2: exprs test: Accept loc change for MyClass 2024-03-04 19:00:38 +00:00
Ian Lynagh
e6f70385f4 Kotlin: Accept more loc changes in library-tests/exprs 2024-02-21 17:23:03 +00:00
Ian Lynagh
006b682333 Kotlin: Accept more loc changes in library-tests/exprs 2024-02-21 17:18:06 +00:00
Ian Lynagh
36b304d9a1 Kotlin: Accept some locations in library-tests/exprs 2024-02-21 17:13:50 +00:00
Ian Lynagh
212d5def16 Kotlin: Accept more loc changes in library-tests/exprs
These are more instances of the same changes as the previous 2 commits
2024-02-21 17:04:49 +00:00
Ian Lynagh
1b98dc16ba Kotlin: Accept some more loc changes in library-tests/exprs 2024-02-21 17:02:59 +00:00
Ian Lynagh
5ecdc29808 Kotlin: Accept some loc changes in library-tests/exprs
These aren't ideal, but I think they will be improve once we handle
pre/post inc/decrement properly.
2024-02-21 17:00:23 +00:00
Ian Lynagh
f6d6a04ba2 Kotlin 2: Accept location changes in library-tests/exprs 2024-02-14 17:01:21 +00:00
Ian Lynagh
4fcc1c26d4 Kotlin 2: Accept location changes in library-tests/exprs 2024-02-14 16:56:22 +00:00
Ian Lynagh
b95c69dc66 Kotlin 2: Accept location changes in library-tests/exprs 2024-02-14 16:54:20 +00:00
Ian Lynagh
2fe4c8c519 Kotlin 2: Accept some loc changes in library-tests/exprs/exprs 2024-02-14 16:47:46 +00:00
Ian Lynagh
14979585c9 Kotlin 2: Accept loc changes for library-tests/exprs/funcExprs.kt 2024-02-14 16:40:54 +00:00
Ian Lynagh
efe5184a74 Kotlin 2: Accept loc change for fn in library-tests/exprs/funcExprs.kt 2024-02-14 16:09:14 +00:00
Ian Lynagh
18a28e2623 Kotlin 2: Accept loc changes in library-tests/exprs for kFunctionInvoke.kt 2024-02-14 16:04:10 +00:00
Ian Lynagh
c11bfb3c83 Kotlin 2: Accept loc changes in library-tests/exprs for localFunctionCalls.kt 2024-02-14 16:03:23 +00:00
Ian Lynagh
1cc645b276 Kotlin 2: Accept location changes in library-tests/exprs for samConversion.kt 2024-02-14 15:49:44 +00:00
Ian Lynagh
9195be34a2 Kotlin 2: Accept location changes in library-tests/exprs/exprs for whenExpr.kt 2024-02-14 15:45:09 +00:00
Ian Lynagh
5d0b780c06 Kotlin 2: Accept some location improvements in library-tests/exprs/exprs.expected 2024-02-14 15:37:37 +00:00
Ian Lynagh
2cc2a90880 Kotlin 2: Accept some location changes in library-tests/exprs/exprs.expected 2024-02-14 15:37:35 +00:00
Ian Lynagh
905583e00a Kotlin: Add a Kotlin 2 copy of the testsuite 2023-11-17 14:07:13 +00:00