blob: 103be3d0f08d9e09eedf7153b9a84da358390d6f [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/super_call.dart:14:12: Error: Can't use 'super' as an expression.
// To delegate a constructor to a super constructor, put the super call as an initializer.
// return super(5);
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() self::A*
: super core::Object::•()
;
method call(core::int* x) core::int*
return x.*(2);
}
class B extends self::A {
synthetic constructor •() self::B*
: super self::A::•()
;
method call(core::int* x) core::int*
return x.*(3);
method call_super() core::int* {
return invalid-expression "pkg/front_end/testcases/general/super_call.dart:14:12: Error: Can't use 'super' as an expression.
To delegate a constructor to a super constructor, put the super call as an initializer.
return super(5);
^";
}
}
static method main() dynamic {
assert(new self::B::•().call_super().==(10));
}