-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Typecheck experimental primitives in damlc (#12650)
Adds a check that experimental primitive is defined in damlc, before you can use it. This is only for the Haskell side, and only intended so we can catch bugs in the compiler more easily. (It would have caught the bug where `observer` wasn't defined correctly in LFConversion.) I also removed RESOLVE_VIRTUAL_CREATE since we're not using it anywhere, it has been superseded by UCreateInterface. changelog_begin changelog_end
- Loading branch information
1 parent
0d5443f
commit dcbb398
Showing
4 changed files
with
31 additions
and
4 deletions.
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
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
11 changes: 11 additions & 0 deletions
11
compiler/damlc/tests/daml-test-files/ExperimentalCheck.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,11 @@ | ||
-- Copyright (c) 2022, Digital Asset (Switzerland) GmbH and/or its affiliates. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- @SINCE-LF-FEATURE DAML_EXPERIMENTAL | ||
-- @ERROR Unknown experimental primitive "DOES_NOT_EXIST" : Unit | ||
|
||
-- | Check that experimental primitives are verified in damlc. | ||
module ExperimentalCheck where | ||
|
||
test : () | ||
test = GHC.Types.primitive @"$DOES_NOT_EXIST" |
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