summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b565808/b565808.cs
blob: 950d21cafc0ec81afce1d4139875a9bece2ebbd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System;
using System.Runtime.CompilerServices;

public class ContentType
{
    public static int errorCount = 0;
#pragma warning disable 0414
    private static readonly ContentType _instance = new ContentType();
#pragma warning restore 0414
    private static readonly char _semicolonSeparator = ';';

    [MethodImplAttribute(MethodImplOptions.NoInlining)]
    public ContentType()
    {
        if (_semicolonSeparator != ';') Console.WriteLine("Error {0}", errorCount++);
    }
}


class My
{

    static int Main()
    {

        new ContentType();
        new ContentType();

        if (ContentType.errorCount == 1)
        {
            Console.WriteLine("TEsT SUCCESS");
            return 100;
        }
        else
        {
            Console.WriteLine("TEsT FAILED");
            return 666;
        }

    }

}