-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing the generic annotations parsing (#22)
* adding the failing test and shortening the extension name * test fix * adding a sophisticated test case * fixing the generic annotation parsing * comments, cleanup, and asserts * extending _typeParametersNames function and removing _typeParametersAnnotation * naming * version bump * minor correction
- Loading branch information
1 parent
81c7ad4
commit 9ef4e7e
Showing
13 changed files
with
191 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import 'package:meta/meta.dart'; | ||
import 'package:copy_with_extension/copy_with_extension.dart'; | ||
|
||
//Won't work without it! | ||
part 'implements_test_case.g.dart'; | ||
|
||
abstract class Abstract { | ||
final String aField; | ||
Abstract(this.aField); | ||
} | ||
|
||
abstract class AbstractWithType<T> { | ||
final T tField; | ||
AbstractWithType(this.tField); | ||
} | ||
|
||
abstract class AbstractWithType1<T> { | ||
final T t1Field; | ||
AbstractWithType1(this.t1Field); | ||
} | ||
|
||
abstract class AbstractWithType2<T, Y> { | ||
final T saField; | ||
final Y sa1Field; | ||
AbstractWithType2(this.saField, this.sa1Field); | ||
} | ||
|
||
@immutable | ||
@CopyWith() | ||
class Basic implements Abstract { | ||
Basic({this.aField}); | ||
|
||
@override | ||
final String aField; | ||
} | ||
|
||
@immutable | ||
@CopyWith() | ||
class WithGenericType<T> implements AbstractWithType<T> { | ||
WithGenericType({this.tField}); | ||
|
||
@override | ||
final T tField; | ||
} | ||
|
||
@immutable | ||
@CopyWith() | ||
class WithSpecificType implements AbstractWithType<String> { | ||
WithSpecificType({this.tField}); | ||
|
||
@override | ||
final String tField; | ||
} | ||
|
||
@immutable | ||
@CopyWith() | ||
class WithBoth<T extends String, Y> | ||
implements | ||
Abstract, | ||
AbstractWithType<T>, | ||
AbstractWithType1<int>, | ||
AbstractWithType2<String, Y> { | ||
WithBoth({ | ||
this.aField, | ||
this.tField, | ||
this.t1Field, | ||
this.saField, | ||
this.sa1Field, | ||
}); | ||
|
||
@override | ||
final String aField; | ||
@override | ||
final T tField; | ||
@override | ||
final int t1Field; | ||
@override | ||
final String saField; | ||
@override | ||
final Y sa1Field; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.