Skip to content

Problem on VB.net compiler with property,when no "As" keyword specified (.NET 4.8) #48587

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
With VB.net 4.8 (Haven't tried any other version)
When, Option Strict is set to OFF;

It turns out this compile, without any error nor warning;

Public ReadOnly Property NumberOfResult() String Integer JohnDoe WwwIIWww Wow
  Get
    Return Me.mList.Count()
  End Get
End Property

I typed too quickly "As" and it switch it for String instead.
But the property is then returning "Object", not string, either Integer and even not JohnDoe (which was nothing in my code, not even a class. I just type something not existing. You can in fact type whatever you want here).


Original Comments

Feedback Bot on 9/16/2020, 00:07 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions