fpc/tests/webtbs/tw27750a.pp
svenbarth 19c6d72c7b Fix for Mantis #27750.
pgenutil.pas:
  * parse_generic_parameters: create explicit undefineddefs for type parameters that don't have a constraint
  * insert_generic_parameter_types: move the created undefineddefs from the parent symtable to the generic's symtable
defcmp.pas, compare_defs_ext:
  * in case the flag for strict undefineddef checks is set don't consider two different undefineddefs as compatible
+ added tests

git-svn-id: trunk@30705 -
2015-04-24 14:51:22 +00:00

34 lines
431 B
ObjectPascal

{ %NORUN }
program tw27750a;
{$MODE DELPHI}
type
{ TGeneric }
TGeneric<Foo, Bar> = record
public type
TGFB = TGeneric<Foo, Bar>;
public
class operator implicit(aFoo : Foo) : TGFB;
class operator implicit(aBar : Bar) : TGFB;
end;
{ TGeneric }
class operator TGeneric<Foo, Bar>.implicit(aFoo: Foo): TGFB;
begin
end;
class operator TGeneric<Foo, Bar>.implicit(aBar: Bar): TGFB;
begin
end;
begin
end.