Take stars out of types where they make more sense.
[mono-project.git] / mcs / tests / test-83.cs
blobe0c758fb78bb2caf80731f61ff335ef0b2741d47
1 //
2 // This test probes that we treat events differently than fields
3 // This used to cause a compiler crash.
4 //
5 using System;
7 delegate void PersonArrivedHandler (object source, PersonArrivedArgs args);
9 class PersonArrivedArgs /*: EventArgs*/ {
10 public string name;
11 public PersonArrivedArgs (string name) {
12 this.name = name;
16 class Greeter {
17 string greeting;
19 public Greeter (string greeting) {
20 this.greeting = greeting;
23 public void HandlePersonArrived (object source, PersonArrivedArgs args) {
24 Console.WriteLine(greeting, args.name);
28 class Room {
29 public event PersonArrivedHandler PersonArrived;
31 public Room () {
32 // Assign a value to it, this also used to crash the compiler.
33 PersonArrived = null;
36 public void AddPerson (string name) {
37 PersonArrived(this, null); //(this, PersonArrivedArgs(name));
41 class DelegateTest {
42 public static int Main () {
43 return 0;