- Timestamp:
- Sep 30, 2024, 10:43:15 AM (4 months ago)
- Branches:
- master
- Children:
- 7968301
- Parents:
- 917f67dd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cpp
r917f67dd re748094 1641 1641 {} 1642 1642 1643 static ast::Type * polyToMonoTypeRec( CodeLocation const & loc, 1643 /// Recursive section of polyToMonoType. 1644 ast::Type * polyToMonoTypeRec( CodeLocation const & loc, 1644 1645 ast::Type const * ty ) { 1645 ast::Type * ret;1646 1646 if ( auto aTy = dynamic_cast<ast::ArrayType const *>( ty ) ) { 1647 // recursive case1648 1647 auto monoBase = polyToMonoTypeRec( loc, aTy->base ); 1649 ret =new ast::ArrayType( monoBase, aTy->dimension,1648 return new ast::ArrayType( monoBase, aTy->dimension, 1650 1649 aTy->isVarLen, aTy->isStatic, aTy->qualifiers ); 1651 1650 } else { 1652 // base case1653 1651 auto charType = new ast::BasicType( ast::BasicKind::Char ); 1654 1652 auto size = new ast::NameExpr( loc, 1655 1653 sizeofName( Mangle::mangleType( ty ) ) ); 1656 ret =new ast::ArrayType( charType, size,1654 return new ast::ArrayType( charType, size, 1657 1655 ast::VariableLen, ast::DynamicDim, ast::CV::Qualifiers() ); 1658 1656 } 1659 return ret;1660 1657 } 1661 1658
Note: See TracChangeset
for help on using the changeset viewer.