summaryrefslogtreecommitdiff
path: root/Test/dafny0/Trait/TraitMultiModule.dfy
blob: 81f4f401a3f24796e259ab356b5e345c654f622c (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
// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t"
// RUN: %diff "%s.expect" "%t"

module M1
{
  trait T1
  {
    method M1 (a:int)    
  }
  class C1 extends T1
  {
    method M1 (x:int)
    {
      var y: int := x;
    }
  }
}

module M2
{
  import opened M1
  class C2 extends T1  // error: currently no support to implement trait in different module
  {
  }
}

module M3
{
  import M1
  class C2 extends M1.T1  // error: currently no support to implement trait in different module
  {
  }
}