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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java

Issue 8632020: Make method overrides with differing parameters a compile-time error (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Report on function name, not entire function! 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
Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
index e422b8ae8f458da39888d16f29e6c0ffa2d52440..69040345ef633498e735fb6d97a2b4592592f202 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
@@ -580,7 +580,7 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
public void testImplementsAndOverrides() {
analyzeClasses(loadSource(
"interface Interface {",
- " void foo(x);",
+ " void foo(int x);",
" void bar();",
"}",
// Abstract class not reported until first instantiation.
@@ -595,7 +595,7 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
"}",
"class SubSubClass extends Class {",
" num bar() { return null; }", // CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE
- " void foo() {}", // CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE
+ " void foo(String x) {}", // CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE
"}",
"class Usage {",
" m() {",
@@ -610,12 +610,12 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
public void testImplementsAndOverrides2() {
analyzeClasses(loadSource(
"interface Interface {",
- " void foo(x);",
+ " void foo(int x);",
"}",
// Abstract class not reported until first instantiation.
"class Class implements Interface {",
" Class() {}",
- " void foo() {}", // CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE
+ " void foo(String x) {}", // CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE
"}"),
TypeErrorCode.CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE);
}

Powered by Google App Engine
This is Rietveld 408576698