mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add tests
This commit is contained in:
committed by
Artem Chikin
parent
d484ec7c1f
commit
a925d6af20
8
test/ConstValues/InlineArrays.swift
Normal file
8
test/ConstValues/InlineArrays.swift
Normal file
@@ -0,0 +1,8 @@
|
||||
// Constant globals on inline arrays
|
||||
|
||||
// RUN: %target-swift-frontend -emit-ir -primary-file %s -parse-as-library -disable-availability-checking
|
||||
|
||||
_const let constGlobal1: InlineArray = [1, 2, 3]
|
||||
_const let constGlobal2: InlineArray = [1.0, 2.0, 3.0]
|
||||
_const let constGlobal3: InlineArray = constGlobal1
|
||||
_const let constGlobal4: Int = ([1, 2, 3] as InlineArray).count
|
||||
Reference in New Issue
Block a user