diff options
author | Adrian Thurston <thurston@complang.org> | 2012-01-15 20:28:45 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2012-01-15 20:28:45 +0000 |
commit | 3243d15a0c97d1d7539bbd8ed39aed72f16ffcda (patch) | |
tree | 06333d20b8a24184802de46a9281bb6a151cd8b0 | |
parent | 6dc93543c99d3bdac2d485bc933639ba45e60caa (diff) | |
download | colm-3243d15a0c97d1d7539bbd8ed39aed72f16ffcda.tar.gz |
Can't use typeRef for checking the type of something in the parser, must use
unique type.
-rw-r--r-- | colm/compile.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/colm/compile.cc b/colm/compile.cc index 0a3d90aa..60e3bef3 100644 --- a/colm/compile.cc +++ b/colm/compile.cc @@ -1265,7 +1265,7 @@ UniqueType *LangTerm::evaluateConstruct( ParseData *pd, CodeVect &code ) const if ( replUT->typeId != TYPE_TREE ) error(loc) << "don't know how to construct this type" << endp; - if ( typeRef->type == TypeRef::Parser ) { + if ( replUT->langEl->generic != 0 && replUT->langEl->generic->typeId == GEN_PARSER ) { code.append( IN_CONSTRUCT_INPUT ); code.append( IN_DUP_TOP_OFF ); code.appendHalf( 1 ); |