mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The DeclChecker had three possible states: - IsFirstPass true, IsSecondPass false. This is the 'first pass' for declarations that appear at the top-level, or are nested inside top-level types. - IsFirstPass false, IsSecondPass true. This is the 'second pass' for declarations that appear at the top-level, or are nested inside top-level types. - IsFirstPass false, IsSecondPass false. This was used for (some) local declarations. This is unnecessarily confusing. We can eliminate the third state by calling typeCheckDecl() twice in a few places. This allows IsSecondPass to be removed entirely since it's now always equal to !IsFirstPass.
11 lines
456 B
Swift
11 lines
456 B
Swift
// This source file is part of the Swift.org open source project
|
|
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
|
|
|
|
// RUN: not %target-swift-frontend %s -emit-ir
|
|
{class a:P{let d=a}@objc protocol P{class a{}{}typealias a
|