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

csc doesn't accept tokens that are in the Ll class. #27986

Closed
stephen-hawley opened this issue Jun 19, 2018 · 3 comments
Closed

csc doesn't accept tokens that are in the Ll class. #27986

stephen-hawley opened this issue Jun 19, 2018 · 3 comments
Assignees
Milestone

Comments

@stephen-hawley
Copy link

Version Used:
Microsoft (R) Visual C# Compiler version 2.6.0.62309 (d3f6b8e)
Steps to Reproduce:
Use the following code:


using System;
using System.Runtime.InteropServices;
namespace UnicodeTests
{
    public class TopLevelEntities
    {
        public static double 𝑒
        {
            get
            {
                return 2.718
            }
        }
    }

Compile with csc.
Expected Behavior:
Correct compile.
Actual Behavior:
/var/folders/jq/jq6r64mn1wvg18lp0bw71f780000gn/T/58603c0f-8712-4a9a-adaa-bf5b607741ee/TopLevelEntitiesUnicodeTests.cs(8,30): error CS1519: Invalid token '�' in class, struct, or interface member declaration

The C# specification states that an identifier can start with a letter-character or a _. A letter-character is defined as "A Unicode character of classes Lu, Ll, Lt, Lm, Lo, or Nl". The letter epsilon (u01d452), referenced above, is in the Ll class.

@chamons
Copy link

chamons commented Jun 19, 2018

Also fails with mcs I believe - @marek-safar

@jcouv
Copy link
Member

jcouv commented Jun 21, 2018

Tagging @gafter

@jcouv jcouv added this to the 16.0 milestone Jun 21, 2018
@gafter gafter self-assigned this Jun 22, 2018
@gafter
Copy link
Member

gafter commented Jul 3, 2018

This is a dup of #9731 #13474 and #13560. Roslyn does not correctly process identifier characters that are represented as surrogate pairs.

@gafter gafter closed this as completed Jul 3, 2018
@gafter gafter added the Bug label Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants