forked from microsoft/verona
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
34 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) | ||
|
||
PrepareTest(VERONAM_FLAGS EXPECTED_DUMP ACTUAL_DUMP) | ||
PrepareTest(VERONAC_FLAGS EXPECTED_DUMP ACTUAL_DUMP) | ||
|
||
CheckStatus( | ||
COMMAND ${MLIRGEN} ${TEST_FILE} -o - | ||
EXPECTED_STATUS 1 | ||
ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.out) | ||
|
||
FileCheck(${TEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.out) | ||
|
||
if(EXPECTED_DUMP) | ||
CheckDump(${EXPECTED_DUMP} ${ACTUAL_DUMP}) | ||
endif() | ||
COMMAND | ||
${MLIRGEN} --verify-diagnostics --split-input-file | ||
${TEST_FILE} -o - | ||
EXPECTED_STATUS 0) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright Microsoft and Project Verona Contributors. | ||
// SPDX-License-Identifier: MIT | ||
|
||
module { | ||
func @test(%x: !verona.meet<U64, iso>) { | ||
// expected-error@+1 {{'!verona.meet<U64, iso>' is not a subtype of '!verona.meet<U64, mut>'}} | ||
%y = verona.copy %x : !verona.meet<U64, iso> -> !verona.meet<U64, mut> | ||
return | ||
} | ||
} | ||
|
||
// ----- | ||
|
||
module { | ||
func @test(%x: !verona.meet<class<"C">, mut>) { | ||
// expected-error@+1 {{'!verona.meet<class<"C">, mut>' is not a subtype of '!verona.meet<class<"D">, mut>'}} | ||
%y = verona.copy %x : !verona.meet<class<"C">, mut> -> !verona.meet<class<"D">, mut> | ||
return | ||
} | ||
} |
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