Priority
Show-stopper
Type
Bug 
State
Fixed 
Assignee
Sergey Shkredov 
Subsystem
No subsystem 
Affected versions
Fixed in
Fixed in build
Next build 
  • Submitted by   Serge Baltic
    2 years ago (24 Oct 2007 15:20)
  • Updated by Serge Baltic
    2 years ago (26 Oct 2007 17:29)
  • Jira: RSRP-51769
    (history, comments)

RSRP-51769

IntroVar::VB: Should Remove the Original Expression When Just Creating a Declaration

0
In C#, we would sometimes declare a local variable by writing the expression first, then intorducing a local var out of it.
This way it gets its type automatically, and sometimes the proper name also.

When the var is introduced, the original expression is removed.

In VB, however, it is not. But it (1) should work as in C#, otherwise create-from-usage patterns are broken, and (2) it is a compilation error in most of the cases. Example:
Dim a As Integer = 1
a * Math.PI / 8


  • >

Dim a As Integer = 1
Dim angle As Double = a * Math.PI / 8
angle()


  • > "Expression is not a method".

Issue was closed
Comments (0)
 
History (0)
 
Links
 
Issue has no comments