@@ -1986,7 +1986,7 @@ static void test30() {
1986
1986
});
1987
1987
}
1988
1988
1989
- // Split-init with tuple destructuring, copying out of tuple
1989
+ // Assignment with tuple destructuring, copying out of tuple
1990
1990
static void test31 () {
1991
1991
testActions (" test31" ,
1992
1992
R""""(
@@ -1997,24 +1997,25 @@ static void test31() {
1997
1997
1998
1998
var tup = (1, r);
1999
1999
2000
- var a : int ;
2001
- var b : R ;
2000
+ var a = 1 ;
2001
+ var b = new R() ;
2002
2002
(a, b) = tup;
2003
2003
tup;
2004
2004
}
2005
2005
}
2006
2006
)"""" ,
2007
2007
{
2008
2008
{AssociatedAction::NEW_INIT, " M.test@2" , " " },
2009
- {AssociatedAction::INIT_OTHER, " tup" , " " },
2010
- {AssociatedAction::ASSIGN, " M.test@12" , " " },
2011
- {AssociatedAction::COPY_INIT, " b" , " " },
2009
+ {AssociatedAction::INIT_OTHER, " tup" , " " },
2010
+ {AssociatedAction::NEW_INIT, " M.test@12" , " " },
2011
+ {AssociatedAction::ASSIGN, " M.test@14" , " " },
2012
+ {AssociatedAction::COPY_INIT, " b" , " " },
2012
2013
{AssociatedAction::DEINIT, " M.test@18" , " r" },
2013
2014
{AssociatedAction::DEINIT, " M.test@18" , " b" }
2014
2015
});
2015
2016
}
2016
2017
2017
- // Split-init with tuple destructuring, moving out of tuple
2018
+ // Assignment with tuple destructuring, moving out of tuple
2018
2019
static void test32 () {
2019
2020
testActions (" test32" ,
2020
2021
R""""(
@@ -2025,21 +2026,22 @@ static void test32() {
2025
2026
2026
2027
var tup = (1, r);
2027
2028
2028
- var a : int ;
2029
- var b : R ;
2029
+ var a = 1 ;
2030
+ var b = new R() ;
2030
2031
(a, b) = tup;
2031
2032
}
2032
2033
}
2033
2034
)"""" ,
2034
2035
{
2035
2036
{AssociatedAction::NEW_INIT, " M.test@2" , " " },
2036
- {AssociatedAction::INIT_OTHER, " tup" , " " },
2037
- {AssociatedAction::ASSIGN, " M.test@12" , " " },
2038
- {AssociatedAction::DEINIT, " M.test@18" , " b" }
2037
+ {AssociatedAction::INIT_OTHER, " tup" , " " },
2038
+ {AssociatedAction::NEW_INIT, " M.test@12" , " " },
2039
+ {AssociatedAction::ASSIGN, " M.test@14" , " " },
2040
+ {AssociatedAction::DEINIT, " M.test@18" , " b" },
2039
2041
});
2040
2042
}
2041
2043
2042
- // Declaring with tuple destructuring, copying out of tuple
2044
+ // Init with tuple destructuring, copying out of tuple
2043
2045
static void test33 () {
2044
2046
testActions (" test33" ,
2045
2047
R""""(
@@ -2057,14 +2059,14 @@ static void test33() {
2057
2059
)"""" ,
2058
2060
{
2059
2061
{AssociatedAction::NEW_INIT, " M.test@2" , " " },
2060
- {AssociatedAction::INIT_OTHER, " tup" , " " },
2061
- {AssociatedAction::COPY_INIT, " b" , " " },
2062
+ {AssociatedAction::INIT_OTHER, " tup" , " " },
2063
+ {AssociatedAction::COPY_INIT, " b" , " " },
2062
2064
{AssociatedAction::DEINIT, " M.test@18" , " r" },
2063
2065
{AssociatedAction::DEINIT, " M.test@18" , " b" }
2064
2066
});
2065
2067
}
2066
2068
2067
- // Declaring with tuple destructuring, moving out of tuple
2069
+ // Init with tuple destructuring, moving out of tuple
2068
2070
static void test34 () {
2069
2071
testActions (" test34" ,
2070
2072
R""""(
@@ -2081,7 +2083,7 @@ static void test34() {
2081
2083
)"""" ,
2082
2084
{
2083
2085
{AssociatedAction::NEW_INIT, " M.test@2" , " " },
2084
- {AssociatedAction::INIT_OTHER, " tup" , " " },
2086
+ {AssociatedAction::INIT_OTHER, " tup" , " " },
2085
2087
{AssociatedAction::DEINIT, " M.test@18" , " r" },
2086
2088
{AssociatedAction::DEINIT, " M.test@18" , " b" }
2087
2089
});
0 commit comments