Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConstructorNamedTest fails on dartc: should have run-time error #1872

Closed
DartBot opened this issue Feb 27, 2012 · 3 comments
Closed

ConstructorNamedTest fails on dartc: should have run-time error #1872

DartBot opened this issue Feb 27, 2012 · 3 comments

Comments

@DartBot
Copy link

DartBot commented Feb 27, 2012

This issue was originally filed by [email protected]


Currently, dartc treats this problem as a warning:

class X {
  X([a='arg1',b='arg2']) { }
}

main() {
  var x = new X('foo', a: 'bar');
}

WARNING:STATIC_TYPE:DUPLICATE_NAMED_ARGUMENT:file:/tmp/t.dart/t.dart:7:24:8: Named parameter argument already provided as positional argument
     6: main() {
     7: var x = new X('foo', a: 'bar');

10.13.2 has non-normative text about the issue saying it 'may not repeat' arguments.

@DartBot
Copy link
Author

DartBot commented Feb 27, 2012

This comment was originally written by [email protected]


After discussing with Gilad today, I think the 'warning' in the case of dartc is
correct (section 10.14.1: the declaration signature is not a supertype of function type formed by the invocation parameters.)

The error specified by 10.13.2 is a run-time error, not a compile-time error, so the static checker wouldn't catch it.


Changed the title to: "ConstructorNamedTest fails on dartc: should have run-time error".

@DartBot
Copy link
Author

DartBot commented Feb 27, 2012

This comment was originally written by [email protected]


https://chromiumcodereview.appspot.com/9477013/


Set owner to [email protected].

@DartBot
Copy link
Author

DartBot commented Mar 28, 2012

This comment was originally written by [email protected]


Added Fixed label.

copybara-service bot pushed a commit that referenced this issue Jan 9, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/9ed196f..29a1bbf):
  29a1bbf8  2023-01-04  Sam Rawlins  Migrate documentation_comment_test to be reflective (#3288)

string_scanner (https://github.com/dart-lang/string_scanner/compare/6ddab2c..c58618d):
  c58618d  2023-01-06  dependabot[bot]  Bump actions/checkout from 3.2.0 to 3.3.0 (#52)

webdev (https://github.com/dart-lang/webdev/compare/8795ca5..49f97b8):
  49f97b8  2023-01-06  Parker Lougheed  Replace deprecated implicit-casts option with strict-casts option (#1863)
  940c0ee  2023-01-06  Elliott Brooks (she/her)  Set a debug key for the injected client and Dart Debug Extension SSE clients (#1872)
  ae3e2ea  2023-01-06  Elliott Brooks (she/her)  [MV3] Dart Debug Extension supports cross-extension communication with AngularDart DevTools  (#1866)
  0662af9  2023-01-06  Anna Gringauze  Fix error message on dds failure2 (#1865)
  4f62035  2023-01-06  Elliott Brooks (she/her)  Can launch embedded Dart Debugger & Flutter Inspector (#1829)
  36fa973  2023-01-05  Elliott Brooks (she/her)  Refactor `TestContext` constructor for clarity (#1844)
  57776a0  2023-01-04  Elliott Brooks (she/her)  Use latest version of `package:sse` in the MV3 Debug Extension (#1859)

Change-Id: Ib97239b4f453238572dcccb9a0f81e4f1e969a04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278683
Commit-Queue: Konstantin Shcheglov <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
copybara-service bot pushed a commit that referenced this issue Jan 31, 2023
…g, mockito, package_config, shelf, string_scanner, test, webdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (https://github.com/dart-lang/async/compare/f700e9a..f700e9a):
  f700e9a  2023-01-27  Devon Carew  blast_repo fixes (#231)

characters (https://github.com/dart-lang/characters/compare/4526aa8..4526aa8):
  4526aa8  2023-01-30  Lasse R.H. Nielsen  Update tables to Unicode 15.0. (#71)

collection (https://github.com/dart-lang/collection/compare/a566328..a566328):
  a566328  2023-01-26  Devon Carew  add a publish script; prep to publish (#267)

dartdoc (https://github.com/dart-lang/dartdoc/compare/bc7bdc4..bc7bdc4):
  bc7bdc44  2023-01-30  dependabot[bot]  Bump js from 0.6.5 to 0.6.7 (#3310)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/e73c4ad..e73c4ad):
  e73c4ad  2023-01-26  Devon Carew  blast_repo fixes (#89)

logging (https://github.com/dart-lang/logging/compare/399100a..399100a):
  399100a  2023-01-26  Devon Carew  add a publish script; prep to publish 1.1.1 (#128)

mockito (https://github.com/dart-lang/mockito/compare/d2a8df1..d2a8df1):
  d2a8df1  2023-01-30  Kevin Moore  Latest build_web_compilers, move to pkg:lints, fix breaks (#605)
  13340b5  2023-01-30  dependabot[bot]  Bump dart-lang/setup-dart from 1.3 to 1.4 (#600)

package_config (https://github.com/dart-lang/package_config/compare/3fe81c4..3fe81c4):
  3fe81c4  2023-01-30  Kevin Moore  Support latest pkg:build_web_compilers, lints. Update min SDK (#129)

shelf (https://github.com/dart-lang/shelf/compare/8fca9d9..8fca9d9):
  8fca9d9  2023-01-26  Devon Carew  blast_repo fixes (#326)

string_scanner (https://github.com/dart-lang/string_scanner/compare/29e471e..29e471e):
  29e471e  2023-01-30  dependabot[bot]  Bump dart-lang/setup-dart from 1.3 to 1.4 (#53)

test (https://github.com/dart-lang/test/compare/cec47c1..cec47c1):
  cec47c1c  2023-01-27  Nate Bosch  Add missing pub requirements (#1878)
  c99d455e  2023-01-27  Nate Bosch  Prepare to publish (#1877)
  0e7ec6a7  2023-01-27  Nate Bosch  Rename `Check` to `Subject` (#1875)
  78382731  2023-01-27  Nate Bosch  Add String.matches condition (#1874)
  26e0e87b  2023-01-27  Nate Bosch  Add Iterable.containsInOrder condition (#1873)
  c9232d6b  2023-01-27  Nate Bosch  Rename `that` to `which` (#1872)
  457166b3  2023-01-26  Nate Bosch  Add missing dependency on package:lints (#1876)
  193f2a0b  2023-01-26  Nate Bosch  Retry instead of extend timeout for flaky Node tests (#1871)
  7ad9b2c3  2023-01-26  Nate Bosch  Overhaul async matchers (#1868)
  ca254546  2023-01-26  Nate Bosch  Add a withQueue utility (#1870)
  6ae2e5e9  2023-01-26  Nate Bosch  Refactor tests to a new isRejectedBy utility (#1867)
  5aeba66d  2023-01-26  Nate Bosch  Use pubspec_overrides.yaml files (#1869)

webdev (https://github.com/dart-lang/webdev/compare/ce9c581..ce9c581):
  ce9c581  2023-01-29  Anna Gringauze  Validate only needed summaries in expression_compiler_service (#1920)

Change-Id: I3ddb0ddeb3b989f6f9e78cd8aa6327aba5899018
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280078
Commit-Queue: Devon Carew <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant