Skip to content

Commit

Permalink
Add test cases for -W{,no-}controller-can
Browse files Browse the repository at this point in the history
  • Loading branch information
akrmn committed Nov 19, 2021
1 parent 09d204b commit 3f738bf
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions compiler/damlc/tests/daml-test-files/NoWarnControllerCan.daml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates.
-- All rights reserved.

{-# OPTIONS_GHC -Wno-controller-can #-}

module NoWarnControllerCan where

template T with
p : Party
q : Party
where
signatory p

controller q can
nonconsuming Pass : ()
do
pure ()
17 changes: 17 additions & 0 deletions compiler/damlc/tests/daml-test-files/WarnControllerCan.daml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates.
-- All rights reserved.

-- @WARN range=14:5-17:18; The syntax 'controller ... can' is deprecated

module WarnControllerCan where

template T with
p : Party
q : Party
where
signatory p

controller q can
nonconsuming Pass : ()
do
pure ()

0 comments on commit 3f738bf

Please sign in to comment.