Skip to content

Commit 6e91fa8

Browse files
authored
Merge pull request #81907 from slavapestov/requires-asserts
These tests require asserts
2 parents ba678b5 + 66177e9 commit 6e91fa8

28 files changed

+28
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// {"signature":"swift::rewriting::RequirementMachine::verify(swift::rewriting::MutableTerm const&) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
protocol a {
45
typealias Index extension Collection where Self : a{b : Index} protocol a

validation-test/compiler_crashers_2/1be7dd4882cd8c39.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// {"signature":"swift::RootProtocolConformance::getWitness(swift::ValueDecl*) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
protocol a{typealias b : IteratorProtocol} extension a{typealias Element =
45
b.Element} protocol c
56
: a{typealias b typealias Element} protocol d
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"(anonymous namespace)::OpaqueUnderlyingTypeChecker::check()"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
Array {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// {"signature":"swift::ast_scope::SpecializeAttributeScope::getSourceRangeOfThisASTNode(bool) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
{
45
@in
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::ast_scope::ASTScopeImpl::printRange(llvm::raw_ostream&) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
func a < >>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// {"signature":"swift::Decl::getResolvedCustomAttrType(swift::CustomAttr*) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
struct a {
45
@b c, () {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// {"signature":"swift::constraints::ConstraintSystem::setCapturedExpansions(swift::AnyFunctionRef, llvm::SmallVector<swift::PackExpansionExpr*, 1u>)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
{
45
repeat a {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::constraints::ConstraintSystem::repairFailures(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::optionset::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, llvm::SmallVectorImpl<swift::constraints::RestrictionOrFix>&, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
func a< b , c : Sequence, d >( b, c) where b== c.Element a( ( 0 , [ (0 0), (

validation-test/compiler_crashers_2/462ee2aa7dc23cf3.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// {"signature":"recordTypeWitness(swift::NormalProtocolConformance*, swift::AssociatedTypeDecl*, swift::Type, swift::TypeDecl*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
protocol a{associatedtype b} protocol c
45
: a{d(b)} protocol e{associatedtype f} extension e {
56
protocol g : e, c { associatedtype f : c associatedtype b }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::TypeChecker::typeCheckParameterDefault(swift::Expr*&, swift::DeclContext*, swift::Type, bool, bool)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
init<a>(b: a == {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::TuplePatternElt& llvm::SmallVectorTemplateBase<swift::TuplePatternElt, true>::growAndEmplaceBack<swift::Identifier, swift::SourceLoc, swift::Pattern*&>(swift::Identifier&&, swift::SourceLoc&&, swift::Pattern*&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
switch { case .a(&b
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// {"signature":"swift::constraints::ConstraintSystem::simplifySameShapeConstraint(swift::Type, swift::Type, swift::optionset::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
struct a < each b {
45
c(d : repeat each b) {
56
c(preacidte : b) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// {"signature":"swift::constraints::ConjunctionStep::SolverSnapshot::~SolverSnapshot()"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
// REQUIRES: OS=macosx
4+
// REQUIRES: asserts
45
import Foundation{let a = malloc(b.c <d>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"(anonymous namespace)::DeclChecker::visitExtensionDecl(swift::ExtensionDecl*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
extension repeat (
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// {"signature":"swift::DefaultAndMaxAccessLevelRequest::cacheResult(std::__1::pair<swift::AccessLevel, swift::AccessLevel>) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
struct a < b extension a where b : c, d == a {
45
protocol c struct a
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::TuplePattern::createSimple(swift::ASTContext&, swift::SourceLoc, llvm::ArrayRef<swift::TuplePatternElt>, swift::SourceLoc)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
switch { case (repeat a

validation-test/compiler_crashers_2/756ba8587e7eb26b.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// {"signature":"(anonymous namespace)::Verifier::verifyChecked(swift::Type)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
class a < b {
45
d {
56
class e<c, b> : a struct f subscript<g>(h : e<f, g>) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::Parser::parseStmtConditionElement(llvm::SmallVectorImpl<swift::StmtConditionElement>&, swift::Diag<>, swift::StmtKind, llvm::StringRef&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
func a: b[ if let
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// {"signature":"swift::AccessLevelRequest::cacheResult(swift::AccessLevel) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
class a < b extension a where c == d {
45
protocol d

validation-test/compiler_crashers_2/a7ee60c01ddf9624.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// {"signature":"(anonymous namespace)::LookupResultBuilder::add(swift::ValueDecl*, swift::DeclContext*, swift::ValueDecl*, swift::Type, bool)::'lambda'(swift::ValueDecl*)::operator()(swift::ValueDecl*) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
protocol a{b} protocol c : a protocol d : c extension d {
45
struct e : d {
56
f {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::PrintingDiagnosticConsumer::printDiagnostic(swift::SourceManager&, swift::DiagnosticInfo const&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck -diagnostic-style=llvm %s
3+
// REQUIRES: asserts
34
' '
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// {"signature":"(anonymous namespace)::Verifier::verifyParsed(swift::AbstractClosureExpr*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
func == {
45
switch {
56
case.a {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::SubstitutionMap::get(swift::GenericSignature, swift::InFlightSubstitution&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
struct a < each b { class c protocol d init(e: c & d

validation-test/compiler_crashers_2/d9fe6f57e64fee5.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// {"signature":"swift::constraints::simplifyLocator(swift::ASTNode&, llvm::ArrayRef<swift::constraints::ConstraintLocator::PathElement>&, swift::SourceRange&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
struct a { eq = "" b "Self ecuador1 Self) > Bool {
45
let getProperties = (
56
\.eq as Self -> _
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// {"signature":"swift::ASTContext::getSpecializedConformance(swift::Type, swift::NormalProtocolConformance*, swift::SubstitutionMap)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
protocol a{ < } protocol b { associatedtype c : a where d == Self }
45
class e<f> : a where f : b, f.c == e
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::ForeignRepresentationInfo::isRepresentableAsOptional() const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
a!!= 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// {"signature":"swift::constraints::MissingContextualConformanceFailure::diagnoseAsError()"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
protocol a }
45
{
56
b -> a? in return .c<d e
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// {"signature":"swift::constraints::Solution::getFunctionArgApplyInfo(swift::constraints::ConstraintLocator*) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: asserts
34
func a<b, each c>(d : repeat(b)->each c) { repeat d(e = f

0 commit comments

Comments
 (0)