Skip to content

Extending or implementing Dynamic should be prohibited #969

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


What steps will reproduce the problem?
Test 1:
class A implements Dynamic {}

main() {
    new A();
}

Test 2:
interface I extends Dynamic {}

class A implements I {}

main() {
    new A();
}

What is the expected output? What do you see instead?
Expected: compile-time error
Actual: compilation ends without errors.

What version of the product are you using? On what operating system?
dartc r2810, Ubuntu 10.04

Please provide any additional information below.
Section 7.9 of the Language Specification: "It is a compile-time error if the implements clause of a class includes type Dynamic."
Section 8.4: "It is a compile-time error if the extends clause of an interface includes type Dynamic."

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions