Bite-Programming-Language icon indicating copy to clipboard operation
Bite-Programming-Language copied to clipboard

new Classname should be allowed an expression

Open RupertAvery opened this issue 3 years ago • 0 comments

You can only assign a new class to a variable, not a property, or pass as an argument, or use anywhere an expression would be used.

This should be possible

class Foo() {
}

class Bar() {
   var foo;
}

var a = new Bar();

a.foo = new Foo();  // error

RupertAvery avatar Apr 12 '22 06:04 RupertAvery