dart-sdk/tests/language_2/instance_call_wrong_argument_count_negative_test.dart
Bob Nystrom bd2a7a7993 Migrate 119.
Change-Id: Ie62df46d0fcf745ac45f693abf392040fda9e6c1
Reviewed-on: https://dart-review.googlesource.com/3426
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-09-07 20:29:15 +00:00

25 lines
617 B
Dart

// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Test mismatch in argument counts.
class InstanceCallWrongArgumentCountNegativeTest {
static void testMain() {
Niederhorn nh = new Niederhorn();
nh.goodCall(1, 2, 3);
// Bad call.
nh.goodCall(1, 2, 3, 4);
}
}
class Niederhorn {
Niederhorn() {}
int goodCall(int a, int b, int c) {
return a + b;
}
}
main() {
InstanceCallWrongArgumentCountNegativeTest.testMain();
}