diff options
author | Piotr Szydełko <wiertel@wiertel.info> | 2017-05-20 06:14:27 (GMT) |
---|---|---|
committer | Piotr Szydełko <wiertel@wiertel.info> | 2017-05-20 06:21:46 (GMT) |
commit | 14a0bcc74a121525917aefc8c9034e283e94884b (patch) | |
tree | c670f763cadf60fe637252211628751f5af464ce /testing | |
parent | 88ff6e5931896a0798997a226e846e75a99f8802 (diff) | |
download | Doxygen-14a0bcc74a121525917aefc8c9034e283e94884b.zip Doxygen-14a0bcc74a121525917aefc8c9034e283e94884b.tar.gz Doxygen-14a0bcc74a121525917aefc8c9034e283e94884b.tar.bz2 |
Fix C# property initializer parsing
int Property {get; set;} = 23;
The parser was ending the property at the closing bracket,
which resulted in the initializer being assigned to the following property.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/066/class_class1.xml | 50 | ||||
-rw-r--r-- | testing/066_property_initializer.cs | 7 |
2 files changed, 57 insertions, 0 deletions
diff --git a/testing/066/class_class1.xml b/testing/066/class_class1.xml new file mode 100644 index 0000000..008bcc6 --- /dev/null +++ b/testing/066/class_class1.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_class1" kind="class" language="C#" prot="public"> + <compoundname>Class1</compoundname> + <sectiondef kind="property"> + <memberdef kind="property" id="class_class1_1a6b0b2ab73516e37adb38b8ff33f97c40" prot="public" static="no" readable="no" writable="no" gettable="yes" privategettable="no" protectedgettable="no" settable="no" privatesettable="no" protectedsettable="no"> + <type>int</type> + <definition>int Class1.Property1</definition> + <argsstring/> + <name>Property1</name> + <initializer>= 1</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="066_property_initializer.cs" line="5" column="1" bodyfile="066_property_initializer.cs" bodystart="5" bodyend="5"/> + </memberdef> + <memberdef kind="property" id="class_class1_1a0d5b843d48ebc2c078e003d6ff3a1610" prot="public" static="no" readable="no" writable="no" gettable="yes" privategettable="no" protectedgettable="no" settable="yes" privatesettable="no" protectedsettable="no"> + <type>string</type> + <definition>string Class1.Property2</definition> + <argsstring/> + <name>Property2</name> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="066_property_initializer.cs" line="6" column="1" bodyfile="066_property_initializer.cs" bodystart="6" bodyend="6"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <location file="066_property_initializer.cs" line="4" column="1" bodyfile="066_property_initializer.cs" bodystart="3" bodyend="7"/> + <listofallmembers> + <member refid="class_class1_1a6b0b2ab73516e37adb38b8ff33f97c40" prot="public" virt="non-virtual"> + <scope>Class1</scope> + <name>Property1</name> + </member> + <member refid="class_class1_1a0d5b843d48ebc2c078e003d6ff3a1610" prot="public" virt="non-virtual"> + <scope>Class1</scope> + <name>Property2</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/066_property_initializer.cs b/testing/066_property_initializer.cs new file mode 100644 index 0000000..d5b5c59 --- /dev/null +++ b/testing/066_property_initializer.cs @@ -0,0 +1,7 @@ +// objective: C# property initializer +// check: class_class1.xml +class Class1 +{ + public int Property1 { get; } = 1; + public string Property2 { get; set; } +} |