mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We only ever use this in TBDGen and interface printing, and we only ever generate TBD files or print interfaces for declarations in primary files, so let's avoid unnecessary work in validateDecl(). Eventually we want validateDecl() to be replaced with a getInterfaceType() request, so adding new attributes in this path (or other side effects in general) is a big no-no.
15 lines
334 B
Swift
15 lines
334 B
Swift
// RUN: %target-swift-frontend %s -emit-silgen | %FileCheck %s
|
|
|
|
// CHECK: final class Rect
|
|
// CHECK: @_hasStorage @_hasInitialValue final var orgx: Double
|
|
final class Rect {
|
|
var orgx = 0.0
|
|
}
|
|
|
|
protocol P { }
|
|
// CHECK: struct Rect2 : P {
|
|
// CHECK: @_hasStorage @_hasInitialValue var orgx: Double
|
|
struct Rect2 : P {
|
|
var orgx = 0.0
|
|
}
|