- tx = tx & CStr(h)
- Internal Error: no means to generate code for expression
The compiler has no complaints about a few hundred earlier occurences of the same construction in the same application.
Code: Select all
Sub main()
Dim Tx as String
Dim h as Byte
Tx = Tx & CStr(h)
End Sub
Everyone has different skill levels and knowledge so I apologize if you think I was undervaluing your experience and skills by my response. Don may know what this error message means but it is always better to provide a testcase to duplicate the problem. My simple tescase worked so something else is needed.dhouston wrote:As I said, a few hundred earlier occurences of the same construction within the same application compile OK so I'm not sure how your little test relates to the issue. Nor do I see how telling me that the & operator is only for strings is helpful. I've been using & only with strings since VB first introduced it.
Internal Errors are generally indicative of a coding error in the compiler. This particular message indicates an optimization problem. The reason that it does not occur in every other use is because the exact details that the optimizer was dealing with differ in that one case and there is either a coding or logic error in the optimizer.Internal Error: no means to generate code for expression
Can anyone explain what this means?
Code: Select all
--optimize=no-constant-propagation
Code: Select all
--optimize=no-optimize
Code: Select all
Public Volatile tx As String