diff options
author | michelou <michelou@epfl.ch> | 2005-06-14 16:37:32 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2005-06-14 16:37:32 +0000 |
commit | ed271f43796435097e1e262ac77d291082be99f4 (patch) | |
tree | 2905e2e0d8fdff691eabf4dc0220939d5946956f /test | |
parent | 8c69c7617ac3b6c42c57d3be197f64dcfcdf5279 (diff) | |
download | scala-ed271f43796435097e1e262ac77d291082be99f4.tar.gz scala-ed271f43796435097e1e262ac77d291082be99f4.tar.bz2 scala-ed271f43796435097e1e262ac77d291082be99f4.zip |
- added user-defined attributes with arguments.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/attributes.scala | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/test/files/pos/attributes.scala b/test/files/pos/attributes.scala index cb2c071408..fdf24b5168 100644 --- a/test/files/pos/attributes.scala +++ b/test/files/pos/attributes.scala @@ -42,13 +42,23 @@ object O5 { [serializable][volatile] protected def foo3 = x3; } -object myAttributes { +object myAttrs { class a1 extends scala.Attribute; + class a2(x: Int) extends scala.Attribute; + class a3(x: a1) extends scala.Attribute; } object O6 { - class a2 extends scala.Attribute; - [myAttributes.a1] class C1; - [myAttributes.a1,a2] class C2; - [myAttributes.a1][a2] class C3; + class a1 extends scala.Attribute; + class a2(x: Int) extends scala.Attribute; + class a3(x: a1) extends scala.Attribute; + final val x = new a1; + [a1] class C1; + [a1,a2(77)] class C2; + [a1][a2(88)] class C3; + [a1][a2(88),a3(null)] class C4; + [myAttrs.a1] class A1; + [myAttrs.a1,myAttrs.a2(99)] class A2; + [myAttrs.a1][myAttrs.a2(99)] class A3; + [myAttrs.a1][myAttrs.a2(99),myAttrs.a3(null)] class A4; } |