You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scheglov opened this issue
Jan 25, 2013
· 6 comments
Labels
area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).P2A bug or feature request we're likely to work ontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
// Test created from multitest named /Users/scheglov/Source/Dart/dart/tests/language/redirecting_factory_infinite_steps_test.dart.
// Copyright (c) 2012, 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.
// From Dart Language Specification, 0.12 M1, "7.6.2 Factories": It is
// a compile-time error if a redirecting factory constructor does not
// redirect to a non-redirecting factory constructor or to a
// generative constructor in a finite number of steps.
// TODO(ahe): The above specification will probably change to
// something like: "It is a compile-time error if a redirecting
// factory constructor redirects to itself, either directly or
// indirectly via a sequence of redirections."
class Foo extends Bar {
factory Foo() = Bar; /// 01: static type warning, dynamic type error
}
class Bar {
}
main() {
new Foo();
}
The text was updated successfully, but these errors were encountered:
kevmoo
added
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
and removed
triaged
labels
Feb 29, 2016
area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).P2A bug or feature request we're likely to work ontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
"factory Foo()" redirects to default Bar constructor in 1 step.
So, no warnings or errors.
cat /Users/scheglov/Source/Dart/dart/xcodebuild/ReleaseIA32/generated_tests/language/redirecting_factory_infinite_steps_test_01.dart
// Test created from multitest named /Users/scheglov/Source/Dart/dart/tests/language/redirecting_factory_infinite_steps_test.dart.
// Copyright (c) 2012, 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.
// From Dart Language Specification, 0.12 M1, "7.6.2 Factories": It is
// a compile-time error if a redirecting factory constructor does not
// redirect to a non-redirecting factory constructor or to a
// generative constructor in a finite number of steps.
// TODO(ahe): The above specification will probably change to
// something like: "It is a compile-time error if a redirecting
// factory constructor redirects to itself, either directly or
// indirectly via a sequence of redirections."
class Foo extends Bar {
factory Foo() = Bar; /// 01: static type warning, dynamic type error
}
class Bar {
}
main() {
new Foo();
}
The text was updated successfully, but these errors were encountered: