-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve errors on duplicate record field names (#9010)
* Improve errors on duplicate record field names fixes #8994 changelog_begin changelog_end * Apparently I was wrong about names changelog_begin changelog_end * hlint changelog_begin changelog_end * newlines don’t render well in daml build changelog_begin changelog_end * maybe I should test if my code compiles before pushing changelog_begin changelog_end
- Loading branch information
1 parent
65fbcfe
commit e542128
Showing
2 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
compiler/damlc/tests/daml-test-files/DuplicateRecordFields.daml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates. | ||
-- All rights reserved. | ||
|
||
-- @ERROR range=12:5-12:6; Duplicate field name a | ||
-- @ERROR range=13:5-13:6; Duplicate field name a | ||
-- @ERROR range=17:5-17:6; Duplicate field name b | ||
|
||
module DuplicateRecordFields where | ||
|
||
data T = T with | ||
a : Int | ||
a : Bool | ||
a : Int | ||
|
||
template T with | ||
b : Int | ||
b : Bool | ||
p : Party | ||
where | ||
signatory p |