mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
error if we can't find class name in the environment
This commit is contained in:
parent
19ec2e3478
commit
07cfecff4e
@ -1406,6 +1406,10 @@ scope NSContext,SymTab;
|
||||
$NSContext::namespaces.Add($NSContext::currentNS);
|
||||
$NSContext::globalNamespaces.Add($NSContext::currentNS);
|
||||
ClassRepTemplate classTypeRep = (ClassRepTemplate)AppEnv.Search($NSContext::currentNS);
|
||||
if (classTypeRep == null) {
|
||||
Error($c.line, "Could not find class " + $NSContext::currentNS + " in the type environment");
|
||||
}
|
||||
else {
|
||||
$SymTab::symtab["this"] = classTypeRep;
|
||||
ClassRepTemplate baseType = ObjectType;
|
||||
if (classTypeRep.Inherits != null && classTypeRep.Inherits.Length > 0) {
|
||||
@ -1416,6 +1420,7 @@ scope NSContext,SymTab;
|
||||
}
|
||||
$SymTab::symtab["super"] = baseType;
|
||||
}
|
||||
}
|
||||
class_body magicAnnotation[$modifiers.tree, $identifier.tree, null, $c.token])
|
||||
-> {$class_implements.hasExtends && $class_implements.extendDotNetType.IsA(AppEnv.Search("System.Attribute", new UnknownRepTemplate("System.Attribute")), AppEnv)}? magicAnnotation
|
||||
-> ^($c attributes? modifiers? identifier type_parameter_constraints_clauses? type_parameter_list? class_implements? class_body);
|
||||
|
Loading…
x
Reference in New Issue
Block a user