IntelliJ IDEA 2018.2.2
解决方案升级IDE版本到 2019.1
详细报错信息Error:Kotlin: [Internal Error] java.lang.IllegalStateException: Backend Internal error: Exception during code generation Cause: Back-end (JVM) Internal error: Couldn’t inline method call ‘post’ into local final fun io.ktor.routing.Route.(): kotlin.Unit defined in userRoutes { get(“/list”) { val users = client.getDatabase(dbName) .getCollection(collectionName) .find() .toList() call.respond(HttpStatusCode.OK, users) } post(“/add”) {request -> val user = User(userName = request.userName, password = request.password, email = request.email) client.getDatabase(dbName) .getCollection(collectionName) .insertOne(user) call.respond(HttpStatusCode.OK) } } Cause: Lambda inlining UserControllerKt$userRoutes$1 2 : c o u l d n ′ t i n l i n e m e t h o d c a l l C a u s e : i n v o k e ( L i o / k t o r / u t i l / p i p e l i n e / P i p e l i n e C o n t e x t ; L C r e a t e U s e r R e q u e s t ; L k o t l i n / c o r o u t i n e s / C o n t i n u a t i o n ; L U s e r C o n t r o l l e r K t 2: couldn't inline method call Cause: invoke (Lio/ktor/util/pipeline/PipelineContext;LCreateUserRequest;Lkotlin/coroutines/Continuation;LUserControllerKt 2:couldn′tinlinemethodcallCause:invoke(Lio/ktor/util/pipeline/PipelineContext;LCreateUserRequest;Lkotlin/coroutines/Continuation;LUserControllerKtuserRoutes 1 ; ) L j a v a / l a n g / O b j e c t ; : L 0 L I N E N U M B E R 284 L 0 N E W U s e r D U P A C O N S T N U L L A L O A D 2 I N V O K E V I R T U A L C r e a t e U s e r R e q u e s t . g e t U s e r N a m e ( ) L j a v a / l a n g / S t r i n g ; L 1 L I N E N U M B E R 285 L 1 A L O A D 2 I N V O K E V I R T U A L C r e a t e U s e r R e q u e s t . g e t P a s s w o r d ( ) L j a v a / l a n g / S t r i n g ; L 2 L I N E N U M B E R 286 L 2 A L O A D 2 I N V O K E V I R T U A L C r e a t e U s e r R e q u e s t . g e t E m a i l ( ) L j a v a / l a n g / S t r i n g ; I C O N S T 1 A C O N S T N U L L L 3 L I N E N U M B E R 284 L 3 I N V O K E S P E C I A L U s e r . < i n i t > ( L j a v a / u t i l / U U I D ; L j a v a / l a n g / S t r i n g ; L j a v a / l a n g / S t r i n g ; L j a v a / l a n g / S t r i n g ; I L k o t l i n / j v m / i n t e r n a l / D e f a u l t C o n s t r u c t o r M a r k e r ; ) V A S T O R E 5 L 4 L I N E N U M B E R 287 L 4 L 5 L I N E N U M B E R 289 L 5 L 6 L I N E N U M B E R 287 L 6 L 7 L I N E N U M B E R 290 L 7 L 8 L I N E N U M B E R 287 L 8 G E T S T A T I C U s e r C o n t r o l l e r K t 1;)Ljava/lang/Object;: L0 LINENUMBER 284 L0 NEW User DUP ACONST_NULL ALOAD 2 INVOKEVIRTUAL CreateUserRequest.getUserName ()Ljava/lang/String; L1 LINENUMBER 285 L1 ALOAD 2 INVOKEVIRTUAL CreateUserRequest.getPassword ()Ljava/lang/String; L2 LINENUMBER 286 L2 ALOAD 2 INVOKEVIRTUAL CreateUserRequest.getEmail ()Ljava/lang/String; ICONST_1 ACONST_NULL L3 LINENUMBER 284 L3 INVOKESPECIAL User. (Ljava/util/UUID;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V ASTORE 5 L4 LINENUMBER 287 L4 L5 LINENUMBER 289 L5 L6 LINENUMBER 287 L6 L7 LINENUMBER 290 L7 L8 LINENUMBER 287 L8 GETSTATIC UserControllerKt 1;)Ljava/lang/Object;:L0LINENUMBER284L0NEWUserDUPACONSTNULLALOAD2INVOKEVIRTUALCreateUserRequest.getUserName()Ljava/lang/String;L1LINENUMBER285L1ALOAD2INVOKEVIRTUALCreateUserRequest.getPassword()Ljava/lang/String;L2LINENUMBER286L2ALOAD2INVOKEVIRTUALCreateUserRequest.getEmail()Ljava/lang/String;ICONST1ACONSTNULLL3LINENUMBER284L3INVOKESPECIALUser.(Ljava/util/UUID;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)VASTORE5L4LINENUMBER287L4L5LINENUMBER289L5L6LINENUMBER287L6L7LINENUMBER290L7L8LINENUMBER287L8GETSTATICUserControllerKtuserRoutes$1 2. 2. 2.KaTeX parse error: Can't use function '$' in math mode at position 5: this$̲0 : LUserContro…$this 0 : L U s e r C o n t r o l l e r K t 0 : LUserControllerKt 0:LUserControllerKtuserRoutes 1 ; G E T F I E L D U s e r C o n t r o l l e r K t 1; GETFIELD UserControllerKt 1;GETFIELDUserControllerKtuserRoutes 1. 1. 1.client m e t a d a t a : L k o t l i n / r e f l e c t / K P r o p e r t y ; A S T O R E 8 N O P L 9 A L O A D 6 I N V O K E I N T E R F A C E k o t l i n / L a z y . g e t V a l u e ( ) L j a v a / l a n g / O b j e c t ; N O P G O T O L 10 L 10 C H E C K C A S T o r g / l i t o t e / k m o n g o / c o r o u t i n e / C o r o u t i n e C l i e n t L 11 L I N E N U M B E R 287 L 11 G E T S T A T I C U s e r C o n t r o l l e r K t metadata : Lkotlin/reflect/KProperty; ASTORE 8 NOP L9 ALOAD 6 INVOKEINTERFACE kotlin/Lazy.getValue ()Ljava/lang/Object; NOP GOTO L10 L10 CHECKCAST org/litote/kmongo/coroutine/CoroutineClient L11 LINENUMBER 287 L11 GETSTATIC UserControllerKt metadata:Lkotlin/reflect/KProperty;ASTORE8NOPL9ALOAD6INVOKEINTERFACEkotlin/Lazy.getValue()Ljava/lang/Object;NOPGOTOL10L10CHECKCASTorg/litote/kmongo/coroutine/CoroutineClientL11LINENUMBER287L11GETSTATICUserControllerKtuserRoutes$1 2. 2. 2.KaTeX parse error: Can't use function '$' in math mode at position 5: this$̲0 : LUserContro…$this 0 : L U s e r C o n t r o l l e r K t 0 : LUserControllerKt 0:LUserControllerKtuserRoutes 1 ; G E T F I E L D U s e r C o n t r o l l e r K t 1; GETFIELD UserControllerKt 1;GETFIELDUserControllerKtuserRoutes 1. 1. 1.collectionName : Ljava/lang/String; ASTORE 7 NOP L13 ICONST_0 ISTORE 8 L14 LINENUMBER 291 L14 ALOAD 6 INVOKEVIRTUAL org/litote/kmongo/coroutine/CoroutineDatabase.getDatabase ()Lcom/mongodb/reactivestreams/client/MongoDatabase; ALOAD 7 LDC LUser;.class INVOKEINTERFACE com/mongodb/reactivestreams/client/MongoDatabase.getCollection (Ljava/lang/String;Ljava/lang/Class;)Lcom/mongodb/reactivestreams/client/MongoCollection; DUP LDC “database.getCollection(c\u2026e, TDocument::class.java)” INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkExpressionValueIsNotNull (Ljava/lang/Object;Ljava/lang/String;)V INVOKESTATIC org/litote/kmongo/coroutine/CoroutineCollectionKt.getCoroutine (Lcom/mongodb/reactivestreams/client/MongoCollection;)Lorg/litote/kmongo/coroutine/CoroutineCollection; NOP GOTO L15 L15 L16 LINENUMBER 289 L16 ALOAD 5 ACONST_NULL ALOAD 0 ICONST_2 ACONST_NULL ICONST_0 INVOKESTATIC kotlin/jvm/internal/InlineMarker.mark (I)V INVOKESTATIC org/litote/kmongo/coroutine/CoroutineCollection.insertOne d e f a u l t ( L o r g / l i t o t e / k m o n g o / c o r o u t i n e / C o r o u t i n e C o l l e c t i o n ; L j a v a / l a n g / O b j e c t ; L c o m / m o n g o d b / c l i e n t / m o d e l / I n s e r t O n e O p t i o n s ; L k o t l i n / c o r o u t i n e s / C o n t i n u a t i o n ; I L j a v a / l a n g / O b j e c t ; ) L j a v a / l a n g / O b j e c t ; I C O N S T 1 I N V O K E S T A T I C k o t l i n / j v m / i n t e r n a l / I n l i n e M a r k e r . m a r k ( I ) V P O P L 17 L I N E N U M B E R 292 L 17 A L O A D 1 A S T O R E 6 N O P L 18 I C O N S T 0 I S T O R E 7 L 19 L I N E N U M B E R 293 L 19 A L O A D 6 I N V O K E I N T E R F A C E i o / k t o r / u t i l / p i p e l i n e / P i p e l i n e C o n t e x t . g e t C o n t e x t ( ) L j a v a / l a n g / O b j e c t ; C H E C K C A S T i o / k t o r / a p p l i c a t i o n / A p p l i c a t i o n C a l l N O P G O T O L 20 L 20 A S T O R E 6 L 21 L I N E N U M B E R 292 L 21 G E T S T A T I C i o / k t o r / h t t p / H t t p S t a t u s C o d e . C o m p a n i o n : L i o / k t o r / h t t p / H t t p S t a t u s C o d e default (Lorg/litote/kmongo/coroutine/CoroutineCollection;Ljava/lang/Object;Lcom/mongodb/client/model/InsertOneOptions;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; ICONST_1 INVOKESTATIC kotlin/jvm/internal/InlineMarker.mark (I)V POP L17 LINENUMBER 292 L17 ALOAD 1 ASTORE 6 NOP L18 ICONST_0 ISTORE 7 L19 LINENUMBER 293 L19 ALOAD 6 INVOKEINTERFACE io/ktor/util/pipeline/PipelineContext.getContext ()Ljava/lang/Object; CHECKCAST io/ktor/application/ApplicationCall NOP GOTO L20 L20 ASTORE 6 L21 LINENUMBER 292 L21 GETSTATIC io/ktor/http/HttpStatusCode.Companion : Lio/ktor/http/HttpStatusCode default(Lorg/litote/kmongo/coroutine/CoroutineCollection;Ljava/lang/Object;Lcom/mongodb/client/model/InsertOneOptions;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;ICONST1INVOKESTATICkotlin/jvm/internal/InlineMarker.mark(I)VPOPL17LINENUMBER292L17ALOAD1ASTORE6NOPL18ICONST0ISTORE7L19LINENUMBER293L19ALOAD6INVOKEINTERFACEio/ktor/util/pipeline/PipelineContext.getContext()Ljava/lang/Object;CHECKCASTio/ktor/application/ApplicationCallNOPGOTOL20L20ASTORE6L21LINENUMBER292L21GETSTATICio/ktor/http/HttpStatusCode.Companion:Lio/ktor/http/HttpStatusCodeCompanion; INVOKEVIRTUAL io/ktor/http/HttpStatusCode C o m p a n i o n . g e t O K ( ) L i o / k t o r / h t t p / H t t p S t a t u s C o d e ; A S T O R E 7 I C O N S T 3 I N V O K E S T A T I C k o t l i n / j v m / i n t e r n a l / I n l i n e M a r k e r . m a r k ( I ) V A C O N S T N U L L A S T O R E 8 N O P L 22 A L O A D 8 I N S T A N C E O F i o / k t o r / r e s p o n s e / A p p l i c a t i o n R e s p o n s e F u n c t i o n s K t Companion.getOK ()Lio/ktor/http/HttpStatusCode; ASTORE 7 ICONST_3 INVOKESTATIC kotlin/jvm/internal/InlineMarker.mark (I)V ACONST_NULL ASTORE 8 NOP L22 ALOAD 8 INSTANCEOF io/ktor/response/ApplicationResponseFunctionsKt Companion.getOK()Lio/ktor/http/HttpStatusCode;ASTORE7ICONST3INVOKESTATICkotlin/jvm/internal/InlineMarker.mark(I)VACONSTNULLASTORE8NOPL22ALOAD8INSTANCEOFio/ktor/response/ApplicationResponseFunctionsKtrespond 1 I F E Q L 23 A L O A D 8 C H E C K C A S T i o / k t o r / r e s p o n s e / A p p l i c a t i o n R e s p o n s e F u n c t i o n s K t 1 IFEQ L23 ALOAD 8 CHECKCAST io/ktor/response/ApplicationResponseFunctionsKt 1IFEQL23ALOAD8CHECKCASTio/ktor/response/ApplicationResponseFunctionsKtrespond 1 A S T O R E 9 A L O A D 9 G E T F I E L D i o / k t o r / r e s p o n s e / A p p l i c a t i o n R e s p o n s e F u n c t i o n s K t 1 ASTORE 9 ALOAD 9 GETFIELD io/ktor/response/ApplicationResponseFunctionsKt 1ASTORE9ALOAD9GETFIELDio/ktor/response/ApplicationResponseFunctionsKtrespond 1. l a b e l : I L D C − 2147483648 I A N D I F E Q L 23 A L O A D 9 D U P G E T F I E L D i o / k t o r / r e s p o n s e / A p p l i c a t i o n R e s p o n s e F u n c t i o n s K t 1.label : I LDC -2147483648 IAND IFEQ L23 ALOAD 9 DUP GETFIELD io/ktor/response/ApplicationResponseFunctionsKt 1.label:ILDC−2147483648IANDIFEQL23ALOAD9DUPGETFIELDio/ktor/response/ApplicationResponseFunctionsKtrespond 1. l a b e l : I L D C − 2147483648 I S U B P U T F I E L D i o / k t o r / r e s p o n s e / A p p l i c a t i o n R e s p o n s e F u n c t i o n s K t 1.label : I LDC -2147483648 ISUB PUTFIELD io/ktor/response/ApplicationResponseFunctionsKt 1.label:ILDC−2147483648ISUBPUTFIELDio/ktor/response/ApplicationResponseFunctionsKtrespond 1. l a b e l : I G O T O L 24 L 23 N E W U s e r C o n t r o l l e r K t 1.label : I GOTO L24 L23 NEW UserControllerKt 1.label:IGOTOL24L23NEWUserControllerKtuserRoutes 1 1 1 s p e c i a l special special i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda 1 D U P A L O A D 8 I N V O K E S P E C I A L U s e r C o n t r o l l e r K t 1 DUP ALOAD 8 INVOKESPECIAL UserControllerKt 1DUPALOAD8INVOKESPECIALUserControllerKtuserRoutes 1 1 1 s p e c i a l special special i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda 1. < i n i t > ( L k o t l i n / c o r o u t i n e s / C o n t i n u a t i o n ; ) V A S T O R E 9 L 24 A L O A D 9 G E T F I E L D U s e r C o n t r o l l e r K t 1. (Lkotlin/coroutines/Continuation;)V ASTORE 9 L24 ALOAD 9 GETFIELD UserControllerKt 1.(Lkotlin/coroutines/Continuation;)VASTORE9L24ALOAD9GETFIELDUserControllerKtuserRoutes 1 1 1 s p e c i a l special special i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda 1. r e s u l t : L j a v a / l a n g / O b j e c t ; A S T O R E 10 I N V O K E S T A T I C k o t l i n / c o r o u t i n e s / i n t r i n s i c s / I n t r i n s i c s K t . g e t C O R O U T I N E S U S P E N D E D ( ) L j a v a / l a n g / O b j e c t ; L 25 L I N E N U M B E R 294 L 25 A S T O R E 11 A L O A D 9 G E T F I E L D U s e r C o n t r o l l e r K t 1.result : Ljava/lang/Object; ASTORE 10 INVOKESTATIC kotlin/coroutines/intrinsics/IntrinsicsKt.getCOROUTINE_SUSPENDED ()Ljava/lang/Object; L25 LINENUMBER 294 L25 ASTORE 11 ALOAD 9 GETFIELD UserControllerKt 1.result:Ljava/lang/Object;ASTORE10INVOKESTATICkotlin/coroutines/intrinsics/IntrinsicsKt.getCOROUTINESUSPENDED()Ljava/lang/Object;L25LINENUMBER294L25ASTORE11ALOAD9GETFIELDUserControllerKtuserRoutes 1 1 1 s p e c i a l special special i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda 1. l a b e l : I T A B L E S W I T C H 0 : L 261 : L 27 d e f a u l t : L 28 L 26 A L O A D 10 D U P I N S T A N C E O F k o t l i n / R e s u l t 1.label : I TABLESWITCH 0: L26 1: L27 default: L28 L26 ALOAD 10 DUP INSTANCEOF kotlin/Result 1.label:ITABLESWITCH0:L261:L27default:L28L26ALOAD10DUPINSTANCEOFkotlin/ResultFailure IFEQ L29 CHECKCAST kotlin/Result F a i l u r e G E T F I E L D k o t l i n / R e s u l t Failure GETFIELD kotlin/Result FailureGETFIELDkotlin/ResultFailure.exception : Ljava/lang/Throwable; ATHROW L29 POP ICONST_0 ISTORE 12 L30 LINENUMBER 295 L30 ALOAD 6 INVOKEINTERFACE io/ktor/application/ApplicationCall.getResponse ()Lio/ktor/response/ApplicationResponse; INVOKEINTERFACE io/ktor/response/ApplicationResponse.getPipeline ()Lio/ktor/response/ApplicationSendPipeline; ALOAD 6 ALOAD 7 ALOAD 9 ALOAD 9 ALOAD 6 PUTFIELD UserControllerKt$userRoutes 1 1 1 s p e c i a l special special i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda$1.L 0 : L j a v a / l a n g / O b j e c t ; A L O A D 9 A L O A D 7 P U T F I E L D U s e r C o n t r o l l e r K t 0 : Ljava/lang/Object; ALOAD 9 ALOAD 7 PUTFIELD UserControllerKt 0:Ljava/lang/Object;ALOAD9ALOAD7PUTFIELDUserControllerKtuserRoutes 1 1 1 s p e c i a l special special i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda$1.L 1 : L j a v a / l a n g / O b j e c t ; A L O A D 9 I C O N S T 1 P U T F I E L D U s e r C o n t r o l l e r K t 1 : Ljava/lang/Object; ALOAD 9 ICONST_1 PUTFIELD UserControllerKt 1:Ljava/lang/Object;ALOAD9ICONST1PUTFIELDUserControllerKtuserRoutes 1 1 1 s p e c i a l special special i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda 1. l a b e l : I I N V O K E V I R T U A L i o / k t o r / r e s p o n s e / A p p l i c a t i o n S e n d P i p e l i n e . e x e c u t e ( L j a v a / l a n g / O b j e c t ; L j a v a / l a n g / O b j e c t ; L k o t l i n / c o r o u t i n e s / C o n t i n u a t i o n ; ) L j a v a / l a n g / O b j e c t ; D U P A L O A D 11 I F A C M P N E L 31 L 32 L I N E N U M B E R 294 L 32 A L O A D 11 A S T O R E 13 P O P A L O A D 13 N O P G O T O L 33 L 27 A L O A D 9 G E T F I E L D U s e r C o n t r o l l e r K t 1.label : I INVOKEVIRTUAL io/ktor/response/ApplicationSendPipeline.execute (Ljava/lang/Object;Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; DUP ALOAD 11 IF_ACMPNE L31 L32 LINENUMBER 294 L32 ALOAD 11 ASTORE 13 POP ALOAD 13 NOP GOTO L33 L27 ALOAD 9 GETFIELD UserControllerKt 1.label:IINVOKEVIRTUALio/ktor/response/ApplicationSendPipeline.execute(Ljava/lang/Object;Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;DUPALOAD11IFACMPNEL31L32LINENUMBER294L32ALOAD11ASTORE13POPALOAD13NOPGOTOL33L27ALOAD9GETFIELDUserControllerKtuserRoutes 1 1 1 s p e c i a l special special i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda$1.L 1 : L j a v a / l a n g / O b j e c t ; A S T O R E 7 A L O A D 9 G E T F I E L D U s e r C o n t r o l l e r K t 1 : Ljava/lang/Object; ASTORE 7 ALOAD 9 GETFIELD UserControllerKt 1:Ljava/lang/Object;ASTORE7ALOAD9GETFIELDUserControllerKtuserRoutes 1 1 1 s p e c i a l special special i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda$1.L 0 : L j a v a / l a n g / O b j e c t ; C H E C K C A S T i o / k t o r / a p p l i c a t i o n / A p p l i c a t i o n C a l l A S T O R E 6 A L O A D 10 D U P I N S T A N C E O F k o t l i n / R e s u l t 0 : Ljava/lang/Object; CHECKCAST io/ktor/application/ApplicationCall ASTORE 6 ALOAD 10 DUP INSTANCEOF kotlin/Result 0:Ljava/lang/Object;CHECKCASTio/ktor/application/ApplicationCallASTORE6ALOAD10DUPINSTANCEOFkotlin/ResultFailure IFEQ L34 CHECKCAST kotlin/Result F a i l u r e G E T F I E L D k o t l i n / R e s u l t Failure GETFIELD kotlin/Result FailureGETFIELDkotlin/ResultFailure.exception : Ljava/lang/Throwable; ATHROW L34 POP ALOAD 10 L31 LINENUMBER 296 L31 POP GETSTATIC kotlin/Unit.INSTANCE : Lkotlin/Unit; NOP GOTO L33 L28 NEW java/lang/IllegalStateException DUP LDC “call to ‘resume’ before ‘invoke’ with coroutine” INVOKESPECIAL java/lang/IllegalStateException. (Ljava/lang/String;)V ATHROW L33 L35 LINENUMBER 292 L35 ARETURN L36 LOCALVARIABLE this_ i v L o r g / l i t o t e / k m o n g o / c o r o u t i n e / C o r o u t i n e D a t a b a s e ; L 13 L 156 L O C A L V A R I A B L E c o l l e c t i o n N a m e iv Lorg/litote/kmongo/coroutine/CoroutineDatabase; L13 L15 6 LOCALVARIABLE collectionName ivLorg/litote/kmongo/coroutine/CoroutineDatabase;L13L156LOCALVARIABLEcollectionNameiv Ljava/lang/String; L13 L15 7 LOCALVARIABLE i i if$getCollection I L14 L15 8 LOCALVARIABLE r e c e i v e r receiver receiveriv Lio/ktor/util/pipeline/PipelineContext; L18 L20 6 LOCALVARIABLE i i if$getCall I L19 L20 7 LOCALVARIABLE r e c e i v e r receiver receiveriv Lio/ktor/application/ApplicationCall; L22 L33 6 LOCALVARIABLE message$iv Ljava/lang/Object; L22 L33 7 LOCALVARIABLE i i if$respond I L30 L28 12 LOCALVARIABLE c o n t i n u a t i o n continuation continuationiv Lkotlin/coroutines/Continuation; L24 L28 9 LOCALVARIABLE user LUser; L4 L35 5 LOCALVARIABLE this LUserControllerKt$userRoutes$1$2; L0 L36 0 LOCALVARIABLE $receiver Lio/ktor/util/pipeline/PipelineContext; L0 L36 1 LOCALVARIABLE request LCreateUserRequest; L0 L36 2 LOCALVARIABLE continuation Lkotlin/coroutines/Continuation; L0 L36 3 LOCALVARIABLE i i ia 2 2 2post I L0 L36 3 MAXSTACK = 8 MAXLOCALS = 14 File being compiled at position: (33,9) in D:/temp/tests/ktor-kmongo-sample2/src/UserController.kt The root cause was thrown at: MethodInliner.kt:817 File being compiled at position: file://D:/temp/tests/ktor-kmongo-sample2/src/UserController.kt The root cause was thrown at: InlineCodegen.kt:124 at org.jetbrains.kotlin.codegen.CompilationErrorHandler.lambda$static 0 ( C o m p i l a t i o n E r r o r H a n d l e r . j a v a : 24 ) a t o r g . j e t b r a i n s . k o t l i n . c o d e g e n . P a c k a g e C o d e g e n I m p l . g e n e r a t e ( P a c k a g e C o d e g e n I m p l . j a v a : 74 ) a t o r g . j e t b r a i n s . k o t l i n . c o d e g e n . D e f a u l t C o d e g e n F a c t o r y . g e n e r a t e P a c k a g e ( C o d e g e n F a c t o r y . k t : 97 ) a t o r g . j e t b r a i n s . k o t l i n . c o d e g e n . D e f a u l t C o d e g e n F a c t o r y . g e n e r a t e M o d u l e ( C o d e g e n F a c t o r y . k t : 68 ) a t o r g . j e t b r a i n s . k o t l i n . c o d e g e n . K o t l i n C o d e g e n F a c a d e . d o G e n e r a t e F i l e s ( K o t l i n C o d e g e n F a c a d e . j a v a : 47 ) a t o r g . j e t b r a i n s . k o t l i n . c o d e g e n . K o t l i n C o d e g e n F a c a d e . c o m p i l e C o r r e c t F i l e s ( K o t l i n C o d e g e n F a c a d e . j a v a : 39 ) a t o r g . j e t b r a i n s . k o t l i n . c l i . j v m . c o m p i l e r . K o t l i n T o J V M B y t e c o d e C o m p i l e r . g e n e r a t e ( K o t l i n T o J V M B y t e c o d e C o m p i l e r . k t : 442 ) a t o r g . j e t b r a i n s . k o t l i n . c l i . j v m . c o m p i l e r . K o t l i n T o J V M B y t e c o d e C o m p i l e r . c o m p i l e M o d u l e s 0(CompilationErrorHandler.java:24) at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generate(PackageCodegenImpl.java:74) at org.jetbrains.kotlin.codegen.DefaultCodegenFactory.generatePackage(CodegenFactory.kt:97) at org.jetbrains.kotlin.codegen.DefaultCodegenFactory.generateModule(CodegenFactory.kt:68) at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:47) at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:39) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:442) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules 0(CompilationErrorHandler.java:24)atorg.jetbrains.kotlin.codegen.PackageCodegenImpl.generate(PackageCodegenImpl.java:74)atorg.jetbrains.kotlin.codegen.DefaultCodegenFactory.generatePackage(CodegenFactory.kt:97)atorg.jetbrains.kotlin.codegen.DefaultCodegenFactory.generateModule(CodegenFactory.kt:68)atorg.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:47)atorg.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:39)atorg.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:442)atorg.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModulescli(KotlinToJVMBytecodeCompiler.kt:146) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:154) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:51) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:95) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:50) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:88) at org.jetbrains.kotlin.daemon.CompileServiceImpl c o m p i l e compile compile i n l i n e d inlined inlinedifAlive$lambda 1. i n v o k e ( C o m p i l e S e r v i c e I m p l . k t : 399 ) a t o r g . j e t b r a i n s . k o t l i n . d a e m o n . C o m p i l e S e r v i c e I m p l 1.invoke(CompileServiceImpl.kt:399) at org.jetbrains.kotlin.daemon.CompileServiceImpl 1.invoke(CompileServiceImpl.kt:399)atorg.jetbrains.kotlin.daemon.CompileServiceImplcompileKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲ifAlive$lambda$…inlined i f A l i v e ifAlive ifAlivelambda 2. i n v o k e ( C o m p i l e S e r v i c e I m p l . k t : 927 ) a t o r g . j e t b r a i n s . k o t l i n . d a e m o n . C o m p i l e S e r v i c e I m p l 2.invoke(CompileServiceImpl.kt:927) at org.jetbrains.kotlin.daemon.CompileServiceImpl 2.invoke(CompileServiceImpl.kt:927)atorg.jetbrains.kotlin.daemon.CompileServiceImpldoCompileKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲ifAlive$lambda$…$this 0 : L U s e r C o n t r o l l e r K t 0 : LUserControllerKt 0:LUserControllerKtuserRoutes 1 ; G E T F I E L D U s e r C o n t r o l l e r K t 1; GETFIELD UserControllerKt 1;GETFIELDUserControllerKtuserRoutes 1. 1. 1.client : Lkotlin/Lazy; ASTORE 6 ACONST_NULL ASTORE 7 GETSTATIC UserControllerKt$userRoutes$1 2. 2. 2.KaTeX parse error: Can't use function '$' in math mode at position 5: this$̲0 : LUserContro…$this 0 : L U s e r C o n t r o l l e r K t 0 : LUserControllerKt 0:LUserControllerKtuserRoutes 1 ; G E T F I E L D U s e r C o n t r o l l e r K t 1; GETFIELD UserControllerKt 1;GETFIELDUserControllerKtuserRoutes 1. 1. 1.dbName : Ljava/lang/String; INVOKEVIRTUAL org/litote/kmongo/coroutine/CoroutineClient.getDatabase (Ljava/lang/String;)Lorg/litote/kmongo/coroutine/CoroutineDatabase; ASTORE 6 L12 LINENUMBER 290 L12 GETSTATIC UserControllerKt$userRoutes$1 2. 2. 2.KaTeX parse error: Can't use function '$' in math mode at position 5: this$̲0 : LUserContro…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…$this 0 : L U s e r C o n t r o l l e r K t 0 : LUserControllerKt 0:LUserControllerKtuserRoutes 1 ; G E T F I E L D U s e r C o n t r o l l e r K t 1; GETFIELD UserControllerKt 1;GETFIELDUserControllerKtuserRoutes 1. 1. 1.client : Lkotlin/Lazy; ASTORE 6 ACONST_NULL ASTORE 7 GETSTATIC UserControllerKt$userRoutes$1 2. 2. 2.KaTeX parse error: Can't use function '$' in math mode at position 5: this$̲0 : LUserContro…$this 0 : L U s e r C o n t r o l l e r K t 0 : LUserControllerKt 0:LUserControllerKtuserRoutes 1 ; G E T F I E L D U s e r C o n t r o l l e r K t 1; GETFIELD UserControllerKt 1;GETFIELDUserControllerKtuserRoutes 1. 1. 1.dbName : Ljava/lang/String; INVOKEVIRTUAL org/litote/kmongo/coroutine/CoroutineClient.getDatabase (Ljava/lang/String;)Lorg/litote/kmongo/coroutine/CoroutineDatabase; ASTORE 6 L12 LINENUMBER 290 L12 GETSTATIC UserControllerKt$userRoutes$1 2. 2. 2.KaTeX parse error: Can't use function '$' in math mode at position 5: this$̲0 : LUserContro…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…specialKaTeX parse error: Can't use function '$' in math mode at position 8: inlined$̲postTyped$1$1$l…special$ i n l i n e d inlined inlinedpostTyped$1 1 1 1lambda$1.L 0 : L j a v a / l a n g / O b j e c t ; C H E C K C A S T i o / k t o r / a p p l i c a t i o n / A p p l i c a t i o n C a l l A S T O R E 6 A L O A D 10 D U P I N S T A N C E O F k o t l i n / R e s u l t 0 : Ljava/lang/Object; CHECKCAST io/ktor/application/ApplicationCall ASTORE 6 ALOAD 10 DUP INSTANCEOF kotlin/Result 0:Ljava/lang/Object;CHECKCASTio/ktor/application/ApplicationCallASTORE6ALOAD10DUPINSTANCEOFkotlin/ResultFailure IFEQ L34 CHECKCAST kotlin/Result F a i l u r e G E T F I E L D k o t l i n / R e s u l t Failure GETFIELD kotlin/Result FailureGETFIELDkotlin/ResultFailure.exception : Ljava/lang/Throwable; ATHROW L34 POP ALOAD 10 L31 LINENUMBER 296 L31 POP GETSTATIC kotlin/Unit.INSTANCE : Lkotlin/Unit; NOP GOTO L33 L28 NEW java/lang/IllegalStateException DUP LDC “call to ‘resume’ before ‘invoke’ with coroutine” INVOKESPECIAL java/lang/IllegalStateException. (Ljava/lang/String;)V ATHROW L33 L35 LINENUMBER 292 L35 ARETURN L36 LOCALVARIABLE this_ i v L o r g / l i t o t e / k m o n g o / c o r o u t i n e / C o r o u t i n e D a t a b a s e ; L 13 L 156 L O C A L V A R I A B L E c o l l e c t i o n N a m e iv Lorg/litote/kmongo/coroutine/CoroutineDatabase; L13 L15 6 LOCALVARIABLE collectionName ivLorg/litote/kmongo/coroutine/CoroutineDatabase;L13L156LOCALVARIABLEcollectionNameiv Ljava/lang/String; L13 L15 7 LOCALVARIABLE i i if$getCollection I L14 L15 8 LOCALVARIABLE r e c e i v e r receiver receiveriv Lio/ktor/util/pipeline/PipelineContext; L18 L20 6 LOCALVARIABLE i i if$getCall I L19 L20 7 LOCALVARIABLE r e c e i v e r receiver receiveriv Lio/ktor/application/ApplicationCall; L22 L33 6 LOCALVARIABLE message$iv Ljava/lang/Object; L22 L33 7 LOCALVARIABLE i i if$respond I L30 L28 12 LOCALVARIABLE c o n t i n u a t i o n continuation continuationiv Lkotlin/coroutines/Continuation; L24 L28 9 LOCALVARIABLE user LUser; L4 L35 5 LOCALVARIABLE this LUserControllerKt$userRoutes$1$2; L0 L36 0 LOCALVARIABLE $receiver Lio/ktor/util/pipeline/PipelineContext; L0 L36 1 LOCALVARIABLE request LCreateUserRequest; L0 L36 2 LOCALVARIABLE continuation Lkotlin/coroutines/Continuation; L0 L36 3 LOCALVARIABLE i i ia 2 2 2post I L0 L36 3 MAXSTACK = 8 MAXLOCALS = 14
at org.jetbrains.kotlin.codegen.inline.MethodInliner.wrapException(MethodInliner.kt:817)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:114)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.access$doInline(MethodInliner.kt:39)
at org.jetbrains.kotlin.codegen.inline.MethodInliner$doInline$lambdaInliner$1.visitMethodInsn(MethodInliner.kt:260)
at org.jetbrains.org.objectweb.asm.tree.MethodInsnNode.accept(MethodInsnNode.java:133)
at org.jetbrains.org.objectweb.asm.tree.InsnList.accept(InsnList.java:162)
at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:817)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:352)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:94)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:67)
at org.jetbrains.kotlin.codegen.inline.AnonymousObjectTransformer.inlineMethod(AnonymousObjectTransformer.kt:312)
at org.jetbrains.kotlin.codegen.inline.AnonymousObjectTransformer.inlineMethodAndUpdateGlobalResult(AnonymousObjectTransformer.kt:276)
at org.jetbrains.kotlin.codegen.inline.AnonymousObjectTransformer.doTransform(AnonymousObjectTransformer.kt:167)
at org.jetbrains.kotlin.codegen.inline.MethodInliner$doInline$lambdaInliner$1.handleAnonymousObjectRegeneration(MethodInliner.kt:173)
at org.jetbrains.kotlin.codegen.inline.MethodInliner$doInline$lambdaInliner$1.anew(MethodInliner.kt:198)
at org.jetbrains.org.objectweb.asm.commons.InstructionAdapter.visitTypeInsn(InstructionAdapter.java:478)
at org.jetbrains.org.objectweb.asm.tree.TypeInsnNode.accept(TypeInsnNode.java:83)
at org.jetbrains.org.objectweb.asm.tree.InsnList.accept(InsnList.java:162)
at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:817)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:352)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:94)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:67)
at org.jetbrains.kotlin.codegen.inline.AnonymousObjectTransformer.inlineMethod(AnonymousObjectTransformer.kt:312)
at org.jetbrains.kotlin.codegen.inline.AnonymousObjectTransformer.inlineMethodAndUpdateGlobalResult(AnonymousObjectTransformer.kt:276)
at org.jetbrains.kotlin.codegen.inline.AnonymousObjectTransformer.doTransform(AnonymousObjectTransformer.kt:167)
at org.jetbrains.kotlin.codegen.inline.MethodInliner$doInline$lambdaInliner$1.handleAnonymousObjectRegeneration(MethodInliner.kt:173)
at org.jetbrains.kotlin.codegen.inline.MethodInliner$doInline$lambdaInliner$1.anew(MethodInliner.kt:198)
at org.jetbrains.org.objectweb.asm.commons.InstructionAdapter.visitTypeInsn(InstructionAdapter.java:478)
at org.jetbrains.org.objectweb.asm.tree.TypeInsnNode.accept(TypeInsnNode.java:83)
at org.jetbrains.org.objectweb.asm.tree.InsnList.accept(InsnList.java:162)
at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:817)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:352)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:94)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:67)
at org.jetbrains.kotlin.codegen.inline.InlineCodegen.inlineCall(InlineCodegen.kt:277)
at org.jetbrains.kotlin.codegen.inline.InlineCodegen.performInline(InlineCodegen.kt:158)
... 94 more
Caused by: java.lang.RuntimeException: Trying to access skipped parameter: Ljava/lang/Object; at 0 at org.jetbrains.kotlin.codegen.inline.LocalVarRemapper.remap(LocalVarRemapper.kt:80) at org.jetbrains.kotlin.codegen.inline.LocalVarRemapper.visitVarInsn(LocalVarRemapper.kt:103) at org.jetbrains.kotlin.codegen.inline.RemapVisitor.visitVarInsn(RemapVisitor.java:53) at org.jetbrains.org.objectweb.asm.tree.VarInsnNode.accept(VarInsnNode.java:86) at org.jetbrains.org.objectweb.asm.tree.InsnList.accept(InsnList.java:162) at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:817) at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:111) … 128 more