fix #2220
This commit is contained in:
parent
fc2f9293a4
commit
4d5a1c458c
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "6";
|
||||
public const string Build = "2";
|
||||
public const string Revision = "2391";
|
||||
public const string Revision = "2392";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=6
|
||||
%REVISION%=2391
|
||||
%COREVERSION%=2
|
||||
%REVISION%=2392
|
||||
%MINOR%=6
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.6.2.2391
|
||||
3.6.2.2392
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.6.2.2391'
|
||||
!define VERSION '3.6.2.2392'
|
||||
|
|
|
|||
16
TestSuite/implicitInInit.pas
Normal file
16
TestSuite/implicitInInit.pas
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
type
|
||||
MyString = class
|
||||
public
|
||||
d: string;
|
||||
static function operator implicit(s: string): MyString;
|
||||
begin
|
||||
Result := new MyString;
|
||||
Result.d := s;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
begin
|
||||
var s: MyString := 'abcde';
|
||||
Assert(s.d = 'abcde');
|
||||
end.
|
||||
|
|
@ -14310,7 +14310,13 @@ namespace PascalABCCompiler.TreeConverter
|
|||
private expression_node convert_strong_to_constant_or_function_call_for_varinit(expression_node exp, type_node tn)
|
||||
{
|
||||
if (exp is constant_node)
|
||||
return convert_strong_to_constant_node(exp, tn);
|
||||
{
|
||||
possible_type_convertions pct = type_table.get_convertions(exp.type, tn);
|
||||
if (pct.first != null && pct.first.convertion_method.IsOperator)
|
||||
//if (convertion_data_and_alghoritms.can_convert_type(exp, tn))
|
||||
return convertion_data_and_alghoritms.convert_type(exp, tn);
|
||||
else return convert_strong_to_constant_node(exp, tn);
|
||||
}
|
||||
if (exp is array_initializer)
|
||||
{
|
||||
//if (tn.type_special_kind != SemanticTree.type_special_kind.array_wrapper)
|
||||
|
|
|
|||
Loading…
Reference in a new issue