Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS8107 Feature 'nullable reference types' is not available in C# 7.0. Please use language version 8.0 or greater #31666

Closed
vsfeedback opened this issue Dec 10, 2018 · 2 comments
Labels
Area-Compilers Bug Developer Community The issue was originally reported on https://developercommunity.visualstudio.com

Comments

@vsfeedback
Copy link

This error reported for this sequence of code

    public static byte[] ConvertToByteArray(object value)
    {
        return
            value is byte[] ? (byte[])value :
            value == null ? null :
                Util.Convert.ToByteArray(value);
    }

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/400852/cs8107-feature-nullable-reference-types-is-not-ava.html
VSTS ticketId: 742071

These are the original issue comments:

Alexey Kuznetsov on 12/7/2018, 01:15 AM (3 days ago): The similar problem.The code the something like that:object value = new string[0];object resultValue = value is string[]? value as string[] : new[] { value.ToString() };Lang c#7. Works in VS 2017.
These are the original issue solutions:
(no solutions)

@jaredpar
Copy link
Member

@cston isn't this a dupe of the conditional parsing bug you fixed for preview 2?

@cston
Copy link
Member

cston commented Dec 10, 2018

@jaredpar, yes this is the parsing bug fixed in #31050.

@sharwell sharwell added the Developer Community The issue was originally reported on https://developercommunity.visualstudio.com label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Developer Community The issue was originally reported on https://developercommunity.visualstudio.com
Projects
None yet
Development

No branches or pull requests

5 participants