@@ -1443,22 +1443,6 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
14431443 )
14441444 }
14451445
1446- pragma [ nomagic]
1447- private predicate typeParameterConstraintHasTypeParameter2 (
1448- Declaration target , AccessPosition apos , TypePath pathToConstrained , Type constraint ,
1449- TypePath pathToTp , TypeParameter tp , TypeParameter constrainedTp
1450- ) {
1451- exists ( DeclarationPosition dpos |
1452- accessDeclarationPositionMatch ( apos , dpos ) and
1453- constrainedTp = target .getTypeParameter ( _) and
1454- tp = target .getTypeParameter ( _) and
1455- tp = getATypeParameterConstraint ( constrainedTp , pathToTp ) and
1456- constrainedTp != tp and
1457- constrainedTp = target .getDeclaredType ( dpos , pathToConstrained ) and
1458- constraint = getATypeParameterConstraint ( constrainedTp , TypePath:: nil ( ) )
1459- )
1460- }
1461-
14621446 pragma [ nomagic]
14631447 private predicate typeConstraintBaseTypeMatch (
14641448 Access a , AccessEnvironment e , Declaration target , TypePath path , Type t , TypeParameter tp
@@ -1471,19 +1455,6 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
14711455 )
14721456 }
14731457
1474- pragma [ nomagic]
1475- private predicate typeConstraintBaseTypeMatch2 (
1476- Access a , AccessEnvironment e , Declaration target , TypePath path , Type t , TypeParameter tp ,
1477- Type constraint , AccessPosition apos , TypePath pathToTp , TypePath pathToTp2 ,
1478- TypeParameter constrainedTp
1479- ) {
1480- not exists ( getTypeArgument ( a , target , tp , _) ) and
1481- typeParameterConstraintHasTypeParameter2 ( target , apos , pathToTp2 , constraint , pathToTp , tp ,
1482- constrainedTp ) and
1483- AccessConstraint:: satisfiesConstraintType ( a , e , target , apos , pathToTp2 , constraint ,
1484- pathToTp .appendInverse ( path ) , t )
1485- }
1486-
14871458 pragma [ inline]
14881459 private predicate typeMatch (
14891460 Access a , AccessEnvironment e , Declaration target , TypePath path , Type t , TypeParameter tp
@@ -1558,52 +1529,6 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
15581529 )
15591530 )
15601531 }
1561-
1562- pragma [ nomagic]
1563- Type inferAccessType2 (
1564- Declaration target , Access a , AccessEnvironment e , AccessPosition apos , TypePath path ,
1565- TypePath prefix , TypeParameter tp , TypePath suffix , Type constraint , AccessPosition apos2 ,
1566- TypePath pathToTp , TypePath pathToTp2 , TypeParameter constrainedTp
1567- ) {
1568- exists ( string filepath , int startline , int startcolumn , int endline , int endcolumn |
1569- a .getLocation ( ) .hasLocationInfo ( filepath , startline , startcolumn , endline , endcolumn )
1570- |
1571- // filepath.matches("%/examples/manual-routing/src/main.rs") and
1572- // startline = [33, 81]
1573- // or
1574- // filepath.matches("%/connection.rs") and
1575- // startline = [838, 953]
1576- // or
1577- filepath .matches ( "%/main.rs" ) and
1578- startline = 2930
1579- ) and
1580- exists ( DeclarationPosition dpos |
1581- accessDeclarationPositionMatch ( apos , dpos ) and
1582- // A suffix of `path` leads to a type parameter in the target
1583- tp = target .getDeclaredType ( dpos , prefix ) and
1584- path = prefix .append ( suffix )
1585- |
1586- // // A type given at the access corresponds directly to the type parameter
1587- // // at the target.
1588- // explicitTypeMatch(a, e, target, suffix, result, tp)
1589- // or
1590- // // We can infer the type of `tp` from one of the access positions
1591- // directTypeMatch(a, e, target, suffix, result, tp)
1592- // or
1593- // // We can infer the type of `tp` by going up the type hiearchy
1594- // baseTypeMatch(a, e, target, suffix, result, tp)
1595- // or
1596- // We can infer the type of `tp` by a type constraint
1597- typeConstraintBaseTypeMatch2 ( a , e , target , suffix , result , tp , constraint , apos2 ,
1598- pathToTp , pathToTp2 , constrainedTp )
1599- // typeMatch(a, e, target, suffix, result, tp)
1600- // or
1601- // // `path` corresponds directly to a concrete type in the declaration
1602- // result = target.getDeclaredType(dpos, path) and
1603- // target = a.getTarget(e) and
1604- // not result instanceof TypeParameter
1605- )
1606- }
16071532 }
16081533
16091534 /** Provides the input to `Matching`. */
@@ -1722,12 +1647,6 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
17221647 Type inferAccessType ( Input:: Access a , Input:: AccessPosition apos , TypePath path ) {
17231648 result = M:: inferAccessType ( a , _, apos , path )
17241649 }
1725-
1726- Type inferAccessType2 (
1727- Input:: Declaration target , Input:: Access a , Input:: AccessPosition apos , TypePath path
1728- ) {
1729- result = M:: inferAccessType2 ( target , a , _, apos , path , _, _, _, _, _, _, _, _)
1730- }
17311650 }
17321651
17331652 /** Provides consistency checks. */
0 commit comments