janino-compiler / janino

Janino is a super-small, super-fast Java™ compiler.
http://janino-compiler.github.io/janino
Other
1.25k stars 208 forks source link

"String s = System.out.println();" throws an InternalCompilerException #176

Closed JohnKranz closed 2 years ago

JohnKranz commented 2 years ago

When UnitCompiler goes to assignment that assigns a return type void method invoke to a non primitive variable.It crashes on method 'org.codehaus.janino.UnitCompiler.tryAssignmentConversion' with an InternalCompileException instead of throwing an CompileException. Please fix it, Thanks. Sry my English is bad.

aunkrig commented 2 years ago

UnitCompiler had problems differentiating between the type of a void method, and the type of the null literal. Added a new constant IClass.NULL for the latter.

Please test.

JohnKranz commented 2 years ago

thank you

------------------ 原始邮件 ------------------ 发件人: "Arno @.>; 发送时间: 2022年8月11日(星期四) 晚上10:11 收件人: @.>; 抄送: @.>; "State @.>; 主题: Re: [janino-compiler/janino] "String s = System.out.println();" throws an InternalCompilerException (Issue #176)

UnitCompiler had problems differentiating between the type of a void method, and the type of the null literal. Added a new constant IClass.NULL for the latter.

Please test.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>