mirror of
https://github.com/apple/swift.git
synced 2026-10-04 11:58:22 +02:00
12 lines
416 B
Python
12 lines
416 B
Python
#!/usr/bin/env python3
|
|
# Emit a nested struct with `count` extensions, each adding a distinct method.
|
|
# This is Used to push one type's serialized extension-table entry past the 16-bit
|
|
# dataLength limit.
|
|
|
|
import sys
|
|
|
|
count = int(sys.argv[1])
|
|
print("public struct Outer { public struct Inner {} }")
|
|
for i in range(1, count + 1):
|
|
print("extension Outer.Inner { public func f%d() -> Int { return %d } }" % (i, i))
|