Fixed in version 2519: Issue with friend interface in .net console app

Trying out Mercury with some sample app .net console samples.

Unknown type error occurs using friend interface as a method argument as below

Public Module Program

  • Private Shared Sub PrintInfo(ByVal item As IInfo)*

  • Console.WriteLine(“Name: {0}, Age {1}”, item.GetName(), item.GetAge())*

  • End Sub*

  • shared Sub Main(args as String())*

  •  Dim a As New CA() With {*
    
  •  .Name = "John Doe",*
    
  •  .Age = 35*
    
  • }*

  • Dim b As New CB() With {*

  •  .First = "Jane",*
    
  •  .Last = "Doe",*
    
  •  .PersonsAge = 33*
    
  • }*

  • PrintInfo(a)*

  • PrintInfo(b)*

  • End Sub*

End Module

Friend Interface IInfo

  • Function GetName() As String*
  • Function GetAge() As String*
    End Interface

Interface implemented by classes CA and CB.

Build 10.0.0.2517. btw : I presume you are aware that new project templates for windows forms and WPF contain Oxygene code in VB files, but I cant get them to work.

I hope this is the correct forum for this topic and thank you for all your excellent work in opening new horizons for VB.

George

1 Like

Curious, this seems like a bug; but I can reproduce this hear. I’ll log so we can get this fixed for next week. FWIW, it doesn’t seem to be related to the Friend visibility — it fails the same if the interface is Public…

Sort of, yes. These should not have bene included in the build yet, as they haven’t been ported yet. I’ll see that I can get them converted for next week, as well…

Sure, yeah. You can also post to Mercury - RemObjects Talk; Talk is our dedicated support forum; this set is more general purpose VB discussion — but also fine.

thanx, much appreciated!

—marc

Thanks, logged as bugs://84348

bugs://84348 got closed with status fixed.