🐞️ isSameType: Add a base case (#8)
* Core - Added a TODO where we are meant to insert the fallback check in `isSameType(Type t1, Type t2)` * TypeChecker - Added backported `isSameType(Type 1, Type t2)` fix for #114
This commit is contained in:
parent
fe8e1403f0
commit
dad185f96f
|
@ -316,6 +316,9 @@ public final class TypeChecker
|
|||
{
|
||||
bool same = false;
|
||||
|
||||
// NOTE: We compare actual types, then check which type
|
||||
// ... the order is important due to type hierachy
|
||||
|
||||
/* Handling for pointers */
|
||||
if(typeid(type1) == typeid(type2) && cast(Pointer)type1 !is null)
|
||||
{
|
||||
|
@ -341,6 +344,11 @@ public final class TypeChecker
|
|||
same = false;
|
||||
}
|
||||
}
|
||||
/* Handling for all other cases */
|
||||
else if(typeid(type1) == typeid(type2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
gprintln("isSameType("~to!(string)(type1)~","~to!(string)(type2)~"): "~to!(string)(same), DebugType.ERROR);
|
||||
return same;
|
||||
|
|
Loading…
Reference in New Issue