This repository was archived by the owner on Sep 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -437,6 +437,11 @@ IdlArray.prototype.test = function()
437
437
IdlArray . prototype . assert_type_is = function ( value , type )
438
438
//@{
439
439
{
440
+ if ( type . idlType in this . members
441
+ && this . members [ type . idlType ] instanceof IdlTypedef ) {
442
+ this . assert_type_is ( value , this . members [ type . idlType ] . idlType ) ;
443
+ return ;
444
+ }
440
445
if ( type . union ) {
441
446
for ( var i = 0 ; i < type . idlType . length ; i ++ ) {
442
447
try {
@@ -644,10 +649,6 @@ IdlArray.prototype.assert_type_is = function(value, type)
644
649
{
645
650
// TODO: Test when we actually have something to test this on
646
651
}
647
- else if ( this . members [ type ] instanceof IdlTypedef )
648
- {
649
- // TODO: Test when we actually have something to test this on
650
- }
651
652
else
652
653
{
653
654
throw "Type " + type + " isn't an interface or dictionary" ;
@@ -2023,8 +2024,8 @@ function IdlTypedef(obj)
2023
2024
/** Self-explanatory. */
2024
2025
this . name = obj . name ;
2025
2026
2026
- /** An array of values produced by the "typedef" production . */
2027
- this . values = obj . values ;
2027
+ /** The idlType that we are supposed to be typedeffing to . */
2028
+ this . idlType = obj . idlType ;
2028
2029
2029
2030
}
2030
2031
//@ }
You can’t perform that action at this time.
0 commit comments