File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -935,8 +935,8 @@ extension EvaluationContext {
935
935
children. append ( . point( v. transformed ( by: childTransform) ) )
936
936
case let . path( path) :
937
937
children. append ( . path( path. transformed ( by: childTransform) ) )
938
- case let . tuple( values) where values. isEmpty :
939
- break
938
+ case let . tuple( values) where values. count <= 1 :
939
+ children += values
940
940
default :
941
941
children. append ( value)
942
942
}
Original file line number Diff line number Diff line change @@ -1401,6 +1401,18 @@ class InterpreterTests: XCTestCase {
1401
1401
XCTAssertEqual ( context. children. count, 1 )
1402
1402
}
1403
1403
1404
+ func testBlockReturningPathInsidePath( ) throws {
1405
+ let program = try parse ( """
1406
+ define foo path {
1407
+ point 0 0
1408
+ point 1 0
1409
+ point 1 1
1410
+ }
1411
+ path { foo }
1412
+ """ )
1413
+ XCTAssertNoThrow ( try evaluate ( program, delegate: nil ) )
1414
+ }
1415
+
1404
1416
// MARK: Ranges
1405
1417
1406
1418
func testRange( ) {
You can’t perform that action at this time.
0 commit comments