Removed redundant check
parent
0e748f15c1
commit
91231ddebd
|
@ -98,24 +98,15 @@ public final class Resolver
|
||||||
{
|
{
|
||||||
Entity entityWithin = resolveUp(c, name);
|
Entity entityWithin = resolveUp(c, name);
|
||||||
|
|
||||||
/* If `name` was in container `c` */
|
/* If `name` was in container `c` or above it */
|
||||||
if(entityWithin)
|
if(entityWithin)
|
||||||
{
|
{
|
||||||
return entityWithin;
|
return entityWithin;
|
||||||
}
|
}
|
||||||
/* If `name` was NOT within container `c` */
|
/* If `name` was NOT found within container `c` or above it */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* If the `name` the name of the container, then return it */
|
return null;
|
||||||
if(cmp(c.getName(), name) == 0)
|
|
||||||
{
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
/* Not found */
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -143,6 +134,9 @@ public final class Resolver
|
||||||
|
|
||||||
if(entityNext)
|
if(entityNext)
|
||||||
{
|
{
|
||||||
|
/* TODO: Technically I could strip new root as we have the container */
|
||||||
|
/* TODO: The only reason I don't want to do that is the condition */
|
||||||
|
//newPath = newPath[indexOf(newPath, '.')+1..newPath.length];
|
||||||
return resolveBest(containerWithin, newPath);
|
return resolveBest(containerWithin, newPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -50,7 +50,7 @@ class O : ooga
|
||||||
{
|
{
|
||||||
class I
|
class I
|
||||||
{
|
{
|
||||||
class L : myModule.ooga
|
class L
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,71 @@ class O : ooga
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Me
|
||||||
|
{
|
||||||
|
class You
|
||||||
|
{
|
||||||
|
class Me
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class InnerMe : Me
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class OuterMe
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Us
|
||||||
|
{
|
||||||
|
class Container : Us
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class Tom
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class Poes
|
||||||
|
{
|
||||||
|
class Kak
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Them
|
||||||
|
{
|
||||||
|
class Container
|
||||||
|
{
|
||||||
|
class TestInner : Container
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class TestOuter : Us.Container
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class Naai : Us.Poes.Kak
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class testClass
|
class testClass
|
||||||
{
|
{
|
||||||
class test2 : testClass
|
class test2 : testClass
|
||||||
|
@ -124,6 +189,30 @@ class testClass
|
||||||
|
|
||||||
class L {}
|
class L {}
|
||||||
|
|
||||||
|
class tieg : troy
|
||||||
|
{
|
||||||
|
class troy
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class troy
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class gabby
|
||||||
|
{
|
||||||
|
class troy
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class testtest8 : testtest7, clazz1.nofuck
|
class testtest8 : testtest7, clazz1.nofuck
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue