Comments (2)
This issue was closed by revision r412.
Original comment by [email protected]
on 10 May 2010 at 1:31
- Changed state: Fixed
from es-lab.
The problem was due to the way Trait.create deals with required properties:
if (pd.required) && !(name in proto)) {
throw new Error('Missing required property: '+name);
} else ...
In this case, properties present in 'proto' will not trigger an Error, but
rather than skipping pd altogether, the
code will continue in the else branch.
Changing the logic as follows fixes this problem:
if (pd.required) {
if (!(name in proto)) {
throw new Error('Missing required property: '+name);
}
Fixed in r412.
Original comment by [email protected]
on 10 May 2010 at 1:33
from es-lab.
Related Issues (19)
- Parser does not support full unicode character set HOT 1
- Page has no doctype
- Can't instantiate traits with accessor properties on latest node.js HOT 2
- Modifying a value don't works on google chrome when using compose HOT 3
- "do {;} while(false) false" parses according to spec: as a syntax error
- Patch for /trunk/src/proxies/forwardingHandler.js
- small error in traits.js
- window.frames === window
- Trait can't deal with global getters on Object.prototype
- Making WeakMap security not depending on HIDDEN_NAME being neither unguessable nor undiscoverable
- Parser does not recognize future es5-strict keywords HOT 2
- Parser does not detect all early errors HOT 3
- 'in' Expressions not allowed in for-in loop declarations HOT 3
- Need PrologueDecl AST type HOT 3
- Need EvalExpr AST type HOT 1
- Backslashes within Regexp literals fail HOT 1
- Try-Catch statements do not properly reflect scope of exception variable HOT 2
- eval(a, b) parsed as CallExpr instead of as EvalExpr HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from es-lab.