summaryrefslogtreecommitdiff
path: root/BCT/RegressionTests/RegressionTestInput/Class1.cs
blob: c6ab393c8a68ed64e567435d06319a29af6e4d0b (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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;

namespace RegressionTestInput {
  public class Class0 {
    void M(int x) {
      int y = (5 / x) + (x = 3);
      Contract.Assert(x == 3 && y <= 8);
    }

    int NonVoid() {
      return 3;
    }

    int OutParam(out int x) {
      x = 3;
      return x;
    }

    int RefParam(ref int x) {
      x = x + 1;
      return x;
    }

    int AssignToInParam(int x) {
      x = x + 1;
      return x;
    }

  }
}