Skip to content

Commit 8858634

Browse files
committed
test class for field as getter and setter
1 parent b571b94 commit 8858634

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test_package/lib/fake.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,3 +327,17 @@ const testingCodeSyntaxInOneLiners = 'fantastic';
327327

328328
/// Referencing something that [doesn't exist].
329329
const incorrectDocReference = 'doh';
330+
331+
/// Tests a single field with explict getter and setter.
332+
class WithGetterAndSetter {
333+
334+
/// Returns a length.
335+
///
336+
/// Throws some exception if used in the fourth dimension.
337+
int get length => 1;
338+
339+
/// Sets the length.
340+
///
341+
/// Throws if set to an imaginary number.
342+
void set length(int _length) {}
343+
}

0 commit comments

Comments
 (0)