Quellcode durchsuchen

* use new chartype_for_stringlike function to retrieve the char type for a stringlike def instead of casting to a stringdef

Sven/Sarah Barth vor 2 Jahren
Ursprung
Commit
e8fcc5343b
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      compiler/pgenutil.pas

+ 1 - 1
compiler/pgenutil.pas

@@ -1158,7 +1158,7 @@ uses
                 begin
                   target_def:=tarraydef(target_def).elementdef;
                   target_key:=generic_param_hash(target_def);
-                  caller_def:=tstringdef(caller_def).get_default_char_type;
+                  caller_def:=chartype_for_stringlike(caller_def);
                 end
               { non-uniform array constructors (i.e. array of const) are not compatible 
                 with normal arrays like "array of T" so we reject them }