Added recursive container check in `checkCotainer(COntainer)` on condition that current Entity being processed is a Container-typed Entity
parent
da8cb92f8a
commit
8567d8baeb
|
@ -320,6 +320,25 @@ public final class TypeChecker
|
||||||
string entityPath = resolver.generateName(modulle, entity);
|
string entityPath = resolver.generateName(modulle, entity);
|
||||||
Parser.expect("Cannot have entity \""~entityPath~"\" with same name as entity \""~preExistingEntity~"\" within same container");
|
Parser.expect("Cannot have entity \""~entityPath~"\" with same name as entity \""~preExistingEntity~"\" within same container");
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Otherwise this Entity is fine
|
||||||
|
*/
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string fullPath = resolver.generateName(modulle, entity);
|
||||||
|
string containerNameFullPath = resolver.generateName(modulle, c);
|
||||||
|
gprintln("Entity \""~fullPath~"\" is allowed to be defined within container \""~containerNameFullPath~"\"");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this Entity is a Container, if so, then
|
||||||
|
* apply the same round of checks within it
|
||||||
|
*/
|
||||||
|
Container possibleContainerEntity = cast(Container)entity;
|
||||||
|
if(possibleContainerEntity)
|
||||||
|
{
|
||||||
|
checkContainer(possibleContainerEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,12 +28,17 @@ class kl
|
||||||
|
|
||||||
class Shekshi
|
class Shekshi
|
||||||
{
|
{
|
||||||
class Shekshi
|
class Shekshi1
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Shekshi;
|
class kl
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int Shekshi2;
|
||||||
|
|
||||||
class G
|
class G
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue