Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please, highlight the essence of the problem in the title #479

Open
ilgonmic opened this issue Jan 24, 2022 · 1 comment
Open

Please, highlight the essence of the problem in the title #479

ilgonmic opened this issue Jan 24, 2022 · 1 comment

Comments

@ilgonmic
Copy link
Collaborator

🕗 Version

0.5.8-rc.4

export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;

🙁 Actual behavior

Multiple overloaded methods with the same signature with suppress error.
Leads to compiler error

e: java.lang.IllegalStateException: Return type is not initialized
at org.jetbrains.kotlin.ir.declarations.impl.IrFunctionBase.getReturnType(IrFunctionBase.kt:57)
at org.jetbrains.kotlin.ir.util.RenderIrElementVisitor.visitSimpleFunction(RenderIrElement.kt:367)
at org.jetbrains.kotlin.ir.util.RenderIrElementVisitor.visitSimpleFunction(RenderIrElement.kt:39)
at org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl.accept(IrFunctionImpl.kt:137)
at org.jetbrains.kotlin.ir.util.RenderIrElementKt.render(RenderIrElement.kt:37)
at org.jetbrains.kotlin.ir.symbols.impl.IrBindablePublicSymbolBase.bind(IrPublicSymbolBase.kt:49)
at org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl.<init>(IrFunctionImpl.kt:133)
at org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl.<init>(IrFunctionImpl.kt:92)
at org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl.<init>(IrFunctionImpl.kt:104)
at org.jetbrains.kotlin.ir.util.OverridesKt$declareSimpleFunctionWithOverrides$1.invoke(overrides.kt:25)
at org.jetbrains.kotlin.ir.util.OverridesKt$declareSimpleFunctionWithOverrides$1.invoke(overrides.kt)
at org.jetbrains.kotlin.ir.util.SymbolTable.declareSimpleFunction(SymbolTable.kt:1561)
at org.jetbrains.kotlin.ir.util.OverridesKt.declareSimpleFunctionWithOverrides(overrides.kt:24)
at org.jetbrains.kotlin.psi2ir.generators.FunctionGenerator.declareSimpleFunctionInner(FunctionGenerator.kt:82)
at org.jetbrains.kotlin.psi2ir.generators.FunctionGenerator.access$declareSimpleFunctionInner(FunctionGenerator.kt:33)
at org.jetbrains.kotlin.psi2ir.generators.FunctionGenerator.generateFunctionDeclaration(FunctionGenerator.kt:358)
at org.jetbrains.kotlin.psi2ir.generators.DeclarationGenerator.generateMemberDeclaration(DeclarationGenerator.kt:44)
at org.jetbrains.kotlin.psi2ir.generators.ModuleGenerator.generateSingleFile(ModuleGenerator.kt:84)
at org.jetbrains.kotlin.psi2ir.generators.ModuleGenerator.generateFiles(ModuleGenerator.kt:69)
at org.jetbrains.kotlin.psi2ir.generators.ModuleGenerator.generateModuleFragmentWithoutDependencies(ModuleGenerator.kt:44)
at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:83)
at org.jetbrains.kotlin.ir.backend.js.KlibKt.generateModuleFragmentWithPlugins(klib.kt:333)
at org.jetbrains.kotlin.ir.backend.js.KlibKt.generateKLib(klib.kt:166)
at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:189)
@ilgonmic
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant