mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
2dbd91aab9
* Update 'implements' blocks to use new syntax * Add InterfaceSyntax test case * Add InterfaceMultipleMethodDeclsError test case * Add InterfaceDifferentNumArgsError test case changelog_begin changelog_end
38 lines
741 B
Haskell
38 lines
741 B
Haskell
-- Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
-- SPDX-License-Identifier: Apache-2.0
|
|
|
|
module Interfaces where
|
|
|
|
interface I1 where
|
|
getOwner1 : Party
|
|
choice C1 : ()
|
|
controller getOwner1 this
|
|
do pure ()
|
|
|
|
interface I2 where
|
|
getOwner2 : Party
|
|
choice C2 : ()
|
|
controller getOwner2 this
|
|
do pure ()
|
|
|
|
template T1
|
|
with
|
|
owner1 : Party
|
|
where
|
|
signatory owner1
|
|
implements I1 where
|
|
getOwner1 = owner1
|
|
choice OwnChoice : ()
|
|
controller owner1
|
|
do pure ()
|
|
|
|
template T2
|
|
with
|
|
owner2 : Party
|
|
where
|
|
signatory owner2
|
|
implements I1 where
|
|
getOwner1 = owner2
|
|
implements I2 where
|
|
getOwner2 = owner2
|