Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

VBNC99999: vbnc.ReturnStatement.ResolveStatement #71

Open
dfredell opened this issue Oct 18, 2019 · 0 comments
Open

VBNC99999: vbnc.ReturnStatement.ResolveStatement #71

dfredell opened this issue Oct 18, 2019 · 0 comments

Comments

@dfredell
Copy link

Error test case

Module HelloWorld
    Sub Main( )
         System.Console.WriteLine(Hello())
    End Sub
    Public Shared Function Hello() As Double()
        Return {42}
    End Function
End Module

This code compiles on Windows 10 .NET Framework 4.7.2 just not Ubuntu 19.04.

$ vbnc test.vb 
Visual Basic.Net Compiler version 0.0.0.5943 (Mono 4.7 - tarball)
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.

vbnc : Command line : error VBNC99999: Unexpected error: Object reference not set to an instance of an object
  at vbnc.ReturnStatement.ResolveStatement (vbnc.ResolveInfo Info) [0x00056] in <ec1be1cad86348049d07975e9b7f88a2>:0 
  at vbnc.CodeBlock.ResolveCode (vbnc.ResolveInfo Info) [0x000c7] in <ec1be1cad86348049d07975e9b7f88a2>:0 
  at vbnc.MethodBaseDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00089] in <ec1be1cad86348049d07975e9b7f88a2>:0 
  at vbnc.SubDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00049] in <ec1be1cad86348049d07975e9b7f88a2>:0 
  at vbnc.BaseObjects`1[T].ResolveCode (vbnc.ResolveInfo Info) [0x00055] in <ec1be1cad86348049d07975e9b7f88a2>:0 
  at vbnc.TypeDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00082] in <ec1be1cad86348049d07975e9b7f88a2>:0 
  at vbnc.AssemblyDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00041] in <ec1be1cad86348049d07975e9b7f88a2>:0 
  at vbnc.Compiler.Compile_Resolve () [0x003bb] in <ec1be1cad86348049d07975e9b7f88a2>:0 
  at vbnc.Compiler.Compile () [0x004c7] in <ec1be1cad86348049d07975e9b7f88a2>:0 
Compilation took 00:00:00.3031790

Workaround

Module HelloWorld
    Sub Main( )
         System.Console.WriteLine(Hello())
    End Sub
    Public Shared Function Hello() As Double()
        Dim output() As Double = {42}
        Return output
    End Function
End Module
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant