mootools / mootools-core

MooTools Core Repository
https://mootools.net
2.65k stars 510 forks source link

Extends: [MyClass] throws "klass is not a constructor" #2791

Closed CNSKnight closed 6 years ago

CNSKnight commented 6 years ago

odd-but-annoying quirk

MooTools.version "1.6.0"

Passing a single-element array to Class.Extends throws "klass is not a constructor"

Replacing Extends: [MyClass] with Extends: MyClass is handled

SergioCrisostomo commented 6 years ago

@CNSKnight can you make a jsFiddle that reproduces this problem?

Oliv commented 6 years ago

I think this reproduces the behaviour : https://jsfiddle.net/68jghwo6/1

DimitarChristoff commented 6 years ago

You can only have one super to extend, array does not make any sense. This is not like Implements