File tree 2 files changed +3
-2
lines changed
main/kotlin/chapi/ast/rustast
test/kotlin/chapi/ast/rustast
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,8 @@ open class RustAstBaseListener(private val fileName: String) : RustParserBaseLis
333
333
}
334
334
335
335
open fun buildReturnType (functionReturnType : RustParser .FunctionReturnTypeContext ? ): String {
336
- return functionReturnType?.type_()?.text ? : " "
336
+ val typeContext: Type_Context ? = functionReturnType?.type_()
337
+ return lookupType(typeContext)
337
338
}
338
339
339
340
open fun buildParameters (functionParameters : RustParser .FunctionParametersContext ? ): List <CodeProperty > {
Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ class RustFullIdentListenerTest {
412
412
413
413
val secondFunction = codeDataStruct.Functions [1 ]
414
414
assertEquals(" main" , secondFunction.Name )
415
- // assertEquals("std::io::Result", secondFunction.ReturnType)
415
+ assertEquals(" std::io::Result" , secondFunction.ReturnType )
416
416
assertEquals(9 , secondFunction.FunctionCalls .size)
417
417
secondFunction.FunctionCalls .map {
418
418
println (" ${it.NodeName } -> ${it.FunctionName } -> ${it.OriginNodeName } " )
You can’t perform that action at this time.
0 commit comments