decltypeof method
Implementation
HTType decltypeof(String id) {
final decl =
currentNamespace.memberGet(id, isRecursive: true, asDeclaration: true);
if (decl is! HTDeclaration) {
return HTTypeUnknown(lexicon.kUnknown);
}
decl.resolve();
var decltype = decl.declType;
if (decltype != null) {
return decltype;
} else if (decl is HTVariableDeclaration) {
return HTTypeAny(lexicon.kAny);
} else {
return HTTypeUnknown(lexicon.kUnknown);
}
}