Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: frog/gen.dart

Issue 8826014: frog: generalize checking that type args aren't used in static methods (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | frog/member.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/gen.dart
diff --git a/frog/gen.dart b/frog/gen.dart
index ceb3b403d573fa0f8ab66d3294b3e7fc4322af19..e16cae92da7609585af2af62cbc35fe1aa41bb0c 100644
--- a/frog/gen.dart
+++ b/frog/gen.dart
@@ -2109,12 +2109,7 @@ class MethodGenerator implements TreeVisitor {
constructorName = '';
}
- if (method.isStatic
- && ((method.typeParameters === null && type.hasTypeParams)
- || type is ParameterType)) {
- world.error('using type parameter in static context', node.span);
- return _makeMissingValue(constructorName);
- } else if (type is ParameterType) {
+ if (type is ParameterType) {
world.error('cannot instantiate a type parameter', node.span);
return _makeMissingValue(constructorName);
}
« no previous file with comments | « no previous file | frog/member.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698