cleanup
This commit is contained in:
parent
aea94d1df4
commit
ae4ef7034f
|
|
@ -1,4 +1,5 @@
|
|||
type
|
||||
//!Невозможно инстанцировать, так как тип T не наследован от List<integer>
|
||||
type
|
||||
t1<T> = class
|
||||
where T: List<integer>;
|
||||
|
||||
|
|
|
|||
|
|
@ -3808,7 +3808,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
location loc = get_location(syntax_tn);
|
||||
|
||||
var tn = (type_node)ret.visit(syntax_tn);
|
||||
if (tn.is_generic_type_definition) need_recheck_where.Add(syntax_tn);
|
||||
if (tn.is_generic_type_definition || tn.is_generic_type_instance) need_recheck_where.Add(syntax_tn);
|
||||
|
||||
if ((tn.original_generic??tn).ForwardDeclarationOnly)
|
||||
AddError(loc, "FORWARD_DECLARATION_{0}_AS_BASE_TYPE", tn.PrintableName);
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ namespace PascalABCCompiler.TreeRealization
|
|||
// tn - не generic параметр - закомментировал
|
||||
if (base_type != tn && !type_table.is_derived(base_type, tn) /*&& !tn.is_generic_parameter*/)
|
||||
{
|
||||
return new SimpleSemanticError(null, "PARAMETER_{0}_MUST_BE_DERIVED_FROM_{1}", tn.PrintableName, base_type.name);
|
||||
return new SimpleSemanticError(null, "PARAMETER_{0}_MUST_BE_DERIVED_FROM_{1}", tn.PrintableName, base_type.PrintableName);
|
||||
}
|
||||
}
|
||||
if (gpe.is_class && !tn.is_class)
|
||||
|
|
@ -179,7 +179,7 @@ namespace PascalABCCompiler.TreeRealization
|
|||
(tn.ImplementingInterfaces == null ||
|
||||
!type_table.is_derived(di, tn)))
|
||||
{
|
||||
return new SimpleSemanticError(null, "PARAMETER_{0}_MUST_IMPLEMENT_INTERFACE_{1}", tn.PrintableName, di.name);
|
||||
return new SimpleSemanticError(null, "PARAMETER_{0}_MUST_IMPLEMENT_INTERFACE_{1}", tn.PrintableName, di.PrintableName);
|
||||
}
|
||||
}
|
||||
if (tn.IsStatic)
|
||||
|
|
|
|||
Loading…
Reference in a new issue