Skip to content

Commit f81f30c

Browse files
committed
Swift: accept test changes
1 parent bed6387 commit f81f30c

File tree

3 files changed

+54
-21
lines changed

3 files changed

+54
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
11
| P<Int, String> | getName: | P<Int, String> | getCanonicalType: | P<Int, String> | getBase: | P | getNumberOfArgs: | 2 |
2+
| RawRepresentable<Bool> | getName: | RawRepresentable<Bool> | getCanonicalType: | RawRepresentable<Bool> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
3+
| RawRepresentable<Double> | getName: | RawRepresentable<Double> | getCanonicalType: | RawRepresentable<Double> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
4+
| RawRepresentable<Float> | getName: | RawRepresentable<Float> | getCanonicalType: | RawRepresentable<Float> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
5+
| RawRepresentable<Int8> | getName: | RawRepresentable<Int8> | getCanonicalType: | RawRepresentable<Int8> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
6+
| RawRepresentable<Int16> | getName: | RawRepresentable<Int16> | getCanonicalType: | RawRepresentable<Int16> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
7+
| RawRepresentable<Int32> | getName: | RawRepresentable<Int32> | getCanonicalType: | RawRepresentable<Int32> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
8+
| RawRepresentable<Int64> | getName: | RawRepresentable<Int64> | getCanonicalType: | RawRepresentable<Int64> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
9+
| RawRepresentable<Int128> | getName: | RawRepresentable<Int128> | getCanonicalType: | RawRepresentable<Int128> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
10+
| RawRepresentable<Int> | getName: | RawRepresentable<Int> | getCanonicalType: | RawRepresentable<Int> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
11+
| RawRepresentable<String> | getName: | RawRepresentable<String> | getCanonicalType: | RawRepresentable<String> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
12+
| RawRepresentable<UInt8> | getName: | RawRepresentable<UInt8> | getCanonicalType: | RawRepresentable<UInt8> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
13+
| RawRepresentable<UInt16> | getName: | RawRepresentable<UInt16> | getCanonicalType: | RawRepresentable<UInt16> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
14+
| RawRepresentable<UInt32> | getName: | RawRepresentable<UInt32> | getCanonicalType: | RawRepresentable<UInt32> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
15+
| RawRepresentable<UInt64> | getName: | RawRepresentable<UInt64> | getCanonicalType: | RawRepresentable<UInt64> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
16+
| RawRepresentable<UInt128> | getName: | RawRepresentable<UInt128> | getCanonicalType: | RawRepresentable<UInt128> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
17+
| RawRepresentable<UInt> | getName: | RawRepresentable<UInt> | getCanonicalType: | RawRepresentable<UInt> | getBase: | RawRepresentable | getNumberOfArgs: | 1 |
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
11
| P<Int, String> | 0 | Int |
22
| P<Int, String> | 1 | String |
3+
| RawRepresentable<Bool> | 0 | Bool |
4+
| RawRepresentable<Double> | 0 | Double |
5+
| RawRepresentable<Float> | 0 | Float |
6+
| RawRepresentable<Int8> | 0 | Int8 |
7+
| RawRepresentable<Int16> | 0 | Int16 |
8+
| RawRepresentable<Int32> | 0 | Int32 |
9+
| RawRepresentable<Int64> | 0 | Int64 |
10+
| RawRepresentable<Int128> | 0 | Int128 |
11+
| RawRepresentable<Int> | 0 | Int |
12+
| RawRepresentable<String> | 0 | String |
13+
| RawRepresentable<UInt8> | 0 | UInt8 |
14+
| RawRepresentable<UInt16> | 0 | UInt16 |
15+
| RawRepresentable<UInt32> | 0 | UInt32 |
16+
| RawRepresentable<UInt64> | 0 | UInt64 |
17+
| RawRepresentable<UInt128> | 0 | UInt128 |
18+
| RawRepresentable<UInt> | 0 | UInt |

swift/ql/test/library-tests/ast/PrintAst.expected

+22-21
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,8 @@ cfg.swift:
702702
# 155| getVariable(1): [ConcreteVarDecl] xOptional
703703
# 155| Type = Int?
704704
# 138| getElement(0): [ForEachStmt] for ... in ... { ... }
705+
# 138| getVariable(0): [ConcreteVarDecl] $generator
706+
# 138| Type = IndexingIterator<ClosedRange<Int>>
705707
# 138| getPattern(): [AnyPattern] _
706708
#-----| getIteratorVar(): [PatternBindingDecl] var ... = ...
707709
# 138| getInit(0): [CallExpr] call to makeIterator()
@@ -844,8 +846,6 @@ cfg.swift:
844846
# 158| getElse(): [BraceStmt] { ... }
845847
# 159| getElement(0): [ReturnStmt] return ...
846848
# 159| getResult(): [BooleanLiteralExpr] false
847-
# 138| [ConcreteVarDecl] $generator
848-
# 138| Type = IndexingIterator<ClosedRange<Int>>
849849
# 141| [ConcreteVarDecl] $match
850850
# 141| Type = Int
851851
# 141| [ConcreteVarDecl] $match
@@ -3259,6 +3259,10 @@ cfg.swift:
32593259
# 525| getExpr(): [ExplicitClosureExpr] { ... }
32603260
# 525| getBody(): [BraceStmt] { ... }
32613261
# 526| getElement(0): [ForEachStmt] for ... in ... { ... }
3262+
# 526| getVariable(0): [ConcreteVarDecl] i
3263+
# 526| Type = Int
3264+
# 526| getVariable(1): [ConcreteVarDecl] $i$generator
3265+
# 526| Type = IndexingIterator<ClosedRange<Int>>
32623266
# 526| getPattern(): [NamedPattern] i
32633267
#-----| getIteratorVar(): [PatternBindingDecl] var ... = ...
32643268
# 526| getInit(0): [CallExpr] call to makeIterator()
@@ -3294,6 +3298,10 @@ cfg.swift:
32943298
# 525| getExpr().getFullyConverted(): [FunctionConversionExpr] (@isolated(any) () async -> ()) ...
32953299
# 523| getPattern(0): [NamedPattern] stream
32963300
# 533| getElement(1): [ForEachStmt] for ... in ... { ... }
3301+
# 533| getVariable(0): [ConcreteVarDecl] i
3302+
# 533| Type = Int
3303+
# 533| getVariable(1): [ConcreteVarDecl] $i$generator
3304+
# 533| Type = AsyncStream<Int>.Iterator
32973305
# 533| getPattern(): [NamedPattern] i
32983306
#-----| getIteratorVar(): [PatternBindingDecl] var ... = ...
32993307
# 533| getInit(0): [CallExpr] call to makeAsyncIterator()
@@ -3302,11 +3310,12 @@ cfg.swift:
33023310
# 533| getBase().getFullyConverted(): [LoadExpr] (AsyncStream<Int>) ...
33033311
#-----| getMethodRef(): [DeclRefExpr] makeAsyncIterator()
33043312
# 533| getPattern(0): [NamedPattern] $i$generator
3305-
# 533| getNextCall(): [CallExpr] call to next()
3306-
# 533| getFunction(): [MethodLookupExpr] .next()
3313+
# 533| getNextCall(): [CallExpr] call to next(isolation:)
3314+
# 533| getFunction(): [MethodLookupExpr] .next(isolation:)
33073315
# 533| getBase(): [DeclRefExpr] $i$generator
33083316
# 533| getBase().getFullyConverted(): [InOutExpr] &...
3309-
#-----| getMethodRef(): [DeclRefExpr] next()
3317+
#-----| getMethodRef(): [DeclRefExpr] next(isolation:)
3318+
# 533| getArgument(0): (no string representation)
33103319
# 533| getNextCall().getFullyConverted(): [AwaitExpr] await ...
33113320
# 533| getBody(): [BraceStmt] { ... }
33123321
# 534| getElement(0): [CallExpr] call to print(_:separator:terminator:)
@@ -3321,14 +3330,6 @@ cfg.swift:
33213330
# 534| getArgument(2): [Argument] terminator: default terminator
33223331
# 534| getExpr(): [DefaultArgumentExpr] default terminator
33233332
# 525| [NilLiteralExpr] nil
3324-
# 526| [ConcreteVarDecl] i
3325-
# 526| Type = Int
3326-
# 526| [ConcreteVarDecl] $i$generator
3327-
# 526| Type = IndexingIterator<ClosedRange<Int>>
3328-
# 533| [ConcreteVarDecl] i
3329-
# 533| Type = Int
3330-
# 533| [ConcreteVarDecl] $i$generator
3331-
# 533| Type = AsyncStream<Int>.Iterator
33323333
# 538| [NamedFunction] testNilCoalescing(x:)
33333334
# 538| InterfaceType = (Int?) -> Int
33343335
# 538| getParam(0): [ParamDecl] x
@@ -6936,6 +6937,10 @@ statements.swift:
69366937
# 9| getVariable(0): [ConcreteVarDecl] i
69376938
# 9| Type = Int
69386939
# 2| getElement(0): [ForEachStmt] for ... in ... { ... }
6940+
# 2| getVariable(0): [ConcreteVarDecl] i
6941+
# 2| Type = Int
6942+
# 2| getVariable(1): [ConcreteVarDecl] $i$generator
6943+
# 2| Type = IndexingIterator<ClosedRange<Int>>
69396944
# 2| getPattern(): [NamedPattern] i
69406945
#-----| getIteratorVar(): [PatternBindingDecl] var ... = ...
69416946
# 2| getInit(0): [CallExpr] call to makeIterator()
@@ -7097,10 +7102,6 @@ statements.swift:
70977102
# 30| getExpr(): [DefaultArgumentExpr] default separator
70987103
# 30| getArgument(2): [Argument] terminator: default terminator
70997104
# 30| getExpr(): [DefaultArgumentExpr] default terminator
7100-
# 2| [ConcreteVarDecl] i
7101-
# 2| Type = Int
7102-
# 2| [ConcreteVarDecl] $i$generator
7103-
# 2| Type = IndexingIterator<ClosedRange<Int>>
71047105
# 34| [EnumDecl] AnError
71057106
# 35| getMember(0): [EnumCaseDecl] case ...
71067107
# 35| getMember(1): [EnumElementDecl] failed
@@ -7371,6 +7372,10 @@ statements.swift:
73717372
# 71| [TopLevelCodeDecl] { ... }
73727373
# 71| getBody(): [BraceStmt] { ... }
73737374
# 71| getElement(0): [ForEachStmt] for ... in ... where ... { ... }
7375+
# 71| getVariable(0): [ConcreteVarDecl] number
7376+
# 71| Type = Int
7377+
# 71| getVariable(1): [ConcreteVarDecl] $number$generator
7378+
# 71| Type = IndexingIterator<[Int]>
73747379
# 71| getPattern(): [NamedPattern] number
73757380
# 71| getWhere(): [BinaryExpr] ... .==(_:_:) ...
73767381
# 71| getFunction(): [MethodLookupExpr] .==(_:_:)
@@ -7401,10 +7406,6 @@ statements.swift:
74017406
# 71| getBase().getFullyConverted(): [InOutExpr] &...
74027407
#-----| getMethodRef(): [DeclRefExpr] next()
74037408
# 71| getBody(): [BraceStmt] { ... }
7404-
# 71| [ConcreteVarDecl] number
7405-
# 71| Type = Int
7406-
# 71| [ConcreteVarDecl] $number$generator
7407-
# 71| Type = IndexingIterator<[Int]>
74087409
# 74| [StructDecl] HasModifyAccessorDecl
74097410
# 75| getMember(0): [PatternBindingDecl] var ... = ...
74107411
# 75| getPattern(0): [TypedPattern] ... as ...

0 commit comments

Comments
 (0)