Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[Compiler] Test for issue #340.

  • Loading branch information...
commit 03768d7371bf4ddb0c6473b17ff834d8d00b1f15 1 parent 2003cb4
VladD2 VladD2 authored

Showing 1 changed file with 27 additions and 0 deletions. Show diff stats Hide diff stats

  1. +27 0 ncc/testsuite/positive/Issue-git-0340.n
27 ncc/testsuite/positive/Issue-git-0340.n
... ... @@ -0,0 +1,27 @@
  1 +using System;
  2 +using System.Console;
  3 +
  4 +module Program
  5 +{
  6 + Main() : void
  7 + {
  8 + WriteLine((typeof(Test).GetCustomAttributes(typeof(MyAtr), false)[0] :> MyAtr).prop);
  9 + }
  10 +}
  11 +
  12 +[AttributeUsage(AttributeTargets.Class)]
  13 +class MyAtr : Attribute
  14 +{
  15 + public prop : object { get; set; }
  16 +}
  17 +
  18 +[MyAtr(prop = "OK")]
  19 +class Test
  20 +{
  21 +}
  22 +
  23 +/*
  24 +BEGIN-OUTPUT
  25 +OK
  26 +END-OUTPUT
  27 +*/

0 comments on commit 03768d7

Please sign in to comment.
Something went wrong with that request. Please try again.