As mentioned previously, I’ve been experimenting with migrating one of my solutions to Mercury. The solution has 11 projects, but I’m only on the 2nd project. This project mostly contains code generated by LLBLGen, which is something on almost everything I create, so getting this working successfully is important for me if I’m going to be using Mercury for any of my existing projects.
Unfortunately right now now I am unable to build successfully, There are 8 different types of errors:
(E373) No overload with 0 parameters, expected 1
(E406) No overloaded method “xxxxxxx” with these parameters…
(E46) Unknown identifier “$WithVar”
(E576) Cannot access member on expression without result type
(E62) Type mismatch, cannot assign “xxxx” to “Int32”
(E626) Member “yyyy” of type sequence “xxxx” is a variable but is used as a method
(E64) Type mismatch, cannot find operator to evaluate “Byte” = “xxxx”
(E714) No “With” statement found for this expression
Maybe some of these are tied to the same underlying issue, but I suspect most of these are independent issues.
Previously I’ve been trying to create sample projects that clearly demonstrate each issue I encounter but I’m starting to wonder if it would be more useful if I just provide you with this project. I don’t have to send the whole solution - I have a modified solution that has only 2 projects and a fairly limited set of external references.
Let me know if you think this makes sense. Otherwise I will continue as I have been, reporting bugs with sample projects as time permits.
That’d be fine for this; yes; I can see if I can isolate the issues, or just pass the whole project on to the team for the bug report, if I can’t. If you do not want to share this code publicly here you can email it to support@remobjects.com.
Dim x = New System.String() { } // E373 No overload with 0 parameters, expected 1
supposed to do?
both of these fail for me:
Dim x = New System.String() { } // E373 No overload with 0 parameters, expected 1
Dim x = New System.String() // E319 No overloaded constructor with 0 parameters for type "System.String"
// H15 Best matching overload is "String (value: array of Char)"
and indeed they seem correct, I see no public constructor on System.String w/o parameters:
Public Sub New(c As [Char], count As Integer)
Public Sub New(value As [Char]())
Public Sub New(value As [Char](), startIndex As Integer, length As Integer)
Public Sub New(value As Ptr(Of Byte), startIndex As Integer, length As Integer, enc As System.Text.Encoding)
Public Sub New(value As Ptr(Of Byte), startIndex As Integer, length As Integer)
Public Sub New(value As Ptr(Of Byte))
Public Sub New(value As Ptr(Of [Char]), startIndex As Integer, length As Integer)
Public Sub New(value As Ptr(Of [Char]))
is this VB special sauce? what does it create, an empty string? or an empty string array?
_Activities = CType(linqmeta.GetQueryableForEntity(Kandor.Data.EntityType.ActivityEntity), IQueryable(Of Global.Kandor.Data.EntityClasses.ActivityEntity))
// E406 No overloaded method "GetQueryableForEntity" with these parameters on type "LinqMetaData", best matching overload is "GetQueryableForEntity(typeOfEntity: Int32): SD.LLBLGen.Pro.LinqSupportClasses.IDataSource"
// H3 parameter 1 is "EntityType" should be "Int32"
it seems like we cant cast Enums to to Integer implicitly, I assumer thats something VB allows, with <VBOptionStrict>Off</VBOptionStrict>, (which your project does have)?
This is where I started to think that maybe I should just send you the project. I hadn’t quite figured out WHY I was getting those “Type mismatch” errors, and I couldn’t replicate it with my sample test project. But that definitely wasn’t an issue before switching to Mercury. I had thought it was related to the fact that the Enum definition actually doesn’t provide a type (this is by design - a library I am using with this doesn’t handle the enums the way I would like unless they are defined without a type), but that may not be the case. But you may be right - it may be as simple as VB not warning on those by default. I’m pretty sure I don’t see errors or warnings on this on the original pre-Mercury project when on build, but I can give it a try again to see for sure.