You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perlang Interactive REPL Console (0.1.0-dev.181, built from git commit 9480f21)
> (2 ** 32) + 0.01
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Operator '+' cannot be applied to operands of type 'System.Numerics.BigInteger' and 'double'
at CallSite.Target(Closure , CallSite , Object , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at Perlang.Interpreter.PerlangInterpreter.VisitBinaryExpr(Binary expr) in /home/runner/work/perlang/perlang/src/Perlang.Interpreter/PerlangInterpreter.cs:line 1057
at Perlang.Expr.Binary.Accept[TR](IVisitor`1 visitor) in /home/runner/work/perlang/perlang/src/Perlang.Common/Expr.cs:line 101
at Perlang.Interpreter.PerlangInterpreter.Evaluate(Expr expr) in /home/runner/work/perlang/perlang/src/Perlang.Interpreter/PerlangInterpreter.cs:line 827
at Perlang.Interpreter.PerlangInterpreter.Eval(String source, ScanErrorHandler scanErrorHandler, ParseErrorHandler parseErrorHandler, NameResolutionErrorHandler nameResolutionErrorHandler, ValidationErrorHandler typeValidationErrorHandler, ValidationErrorHandler immutabilityValidationErrorHandler, CompilerWarningHandler compilerWarningHandler) in /home/runner/work/perlang/perlang/src/Perlang.Interpreter/PerlangInterpreter.cs:line 385
at Perlang.ConsoleApp.Program.Run(String source, CompilerWarningHandler compilerWarningHandler) in /home/runner/work/perlang/perlang/src/Perlang.ConsoleApp/Program.cs:line 352
at Perlang.ConsoleApp.Program.RunPrompt() in /home/runner/work/perlang/perlang/src/Perlang.ConsoleApp/Program.cs:line 346
at Perlang.ConsoleApp.Program.<>c__DisplayClass9_0.<MainWithCustomConsole>b__3(ParseResult parseResult, IConsole console) in /home/runner/work/perlang/perlang/src/Perlang.ConsoleApp/Program.cs:line 180
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object , Span`1& , Signature , Boolean , Boolean )
at System.Reflection.RuntimeMethodInfo.Invoke(Object , BindingFlags , Binder , Object[] , CultureInfo )
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass25_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__24_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass11_0.<<UseDebugDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
I tracked this with git bisect quite a bit back, and it seems to have been broken at least since dfa1900, i.e. the first version that built on .NET 5. I don't currently have any .NET Core 3.1 SDK installed so I'm unable to test the older versions (unless I install them manually with perlang-install, hmm...). Suffice to say, this has been broken for a long time.
The text was updated successfully, but these errors were encountered:
Just like with #229, this now works better as of #237 being merged:
> (2 ** 32) + 0.01
[line 1] Operands must be numbers, not bigint and double
>
This is not perfect, but I can live with it. I don't think we need to be perfect in the 0.1.0 release, but we shouldn't have any (known) things with which you can crash the entire REPL/interpreter at least.
This is currently broken:
I tracked this with
git bisect
quite a bit back, and it seems to have been broken at least since dfa1900, i.e. the first version that built on .NET 5. I don't currently have any .NET Core 3.1 SDK installed so I'm unable to test the older versions (unless I install them manually withperlang-install
, hmm...). Suffice to say, this has been broken for a long time.The text was updated successfully, but these errors were encountered: