Bug 18397 - Stray [ doesn't prevent compilation
Summary: Stray [ doesn't prevent compilation
Status: NEW
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2014-03-14 09:36 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2014-03-14 09:36 UTC (History)
1 user (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Rolf Bjarne Kvinge [MSFT] 2014-03-14 09:36:08 UTC
Test case:

public class C {
    public C () {}

compiles just with only a warning:
   test.cs(2,3): warning CS0658: `public' is invalid attribute target. All attributes in this attribute section will be ignored

I haven't actually confirmed this with csc, but I wouldn't expect this snippet to compile at all.

> mono --version
Mono JIT compiler version 3.4.0 ((no/6b959ef Mon Mar 10 12:30:52 EDT 2014)

Note You need to log in before you can comment on or make changes to this bug.