Browse Source

* accept only valid guid as iid for com and dispinterfaces, resolves #12030; I'am not sure though if this isn't a feature used by people already

git-svn-id: trunk@12380 -
florian 16 years ago
parent
commit
499c523346
3 changed files with 10 additions and 1 deletions
  1. 1 0
      .gitattributes
  2. 0 1
      compiler/pdecobj.pas
  3. 9 0
      tests/webtbf/tw12303.pp

+ 1 - 0
.gitattributes

@@ -8162,6 +8162,7 @@ tests/webtbf/tw11849a.pp svneol=native#text/plain
 tests/webtbf/tw11862a.pp svneol=native#text/plain
 tests/webtbf/tw11970.pp svneol=native#text/plain
 tests/webtbf/tw12075.pp svneol=native#text/plain
+tests/webtbf/tw12303.pp svneol=native#text/plain
 tests/webtbf/tw12329.pp svneol=native#text/plain
 tests/webtbf/tw12365a.cfg svneol=native#text/plain
 tests/webtbf/tw12365a.pp svneol=native#text/plain

+ 0 - 1
compiler/pdecobj.pas

@@ -204,7 +204,6 @@ implementation
             current_objectdef.iidstr:=stringdup(strpas(tstringconstnode(p).value_str));
             valid:=string2guid(current_objectdef.iidstr^,current_objectdef.iidguid^);
             if (current_objectdef.objecttype in [odt_interfacecom,odt_dispinterface]) and
-               not assigned(current_objectdef.iidguid) and
                not valid then
               Message(parser_e_improper_guid_syntax);
             include(current_objectdef.objectoptions,oo_has_valid_guid);

+ 9 - 0
tests/webtbf/tw12303.pp

@@ -0,0 +1,9 @@
+{ %fail }
+{$mode objfpc}
+type
+  IResourceTypeBlock = interface
+   ['9c497a71-8b3d-11dd-ad8b-0800200c9a66']
+  end;
+
+begin
+end.